diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -9,20 +9,24 @@
 
 *   [![GitHub](https://img.shields.io/github/tag/eggzilla/cmv.svg)](https://github.com/eggzilla/cmv) [![Build Status](https://travis-ci.org/eggzilla/cmv.svg?branch=master)](https://travis-ci.org/eggzilla/cmv) [![Hackage](https://img.shields.io/hackage/v/cmv.svg)](https://hackage.haskell.org/package/cmv) [![Bioconda](https://anaconda.org/bioconda/cmv/badges/version.svg)](https://anaconda.org/bioconda/cmv) [![Docker Repository on Quay](https://quay.io/repository/biocontainers/cmv/status "Docker Repository on Quay")](https://quay.io/repository/repository/biocontainers/cmv)
 
-For instruction how to use *cmv* please see the [Help page.](192.52.2.124/cmvs/help)
-
-### Usage via biocontainer (docker)
-
-*cmv* can be retrieved and used as docker container with all dependencies via [docker](https://docs.docker.com/engine/installation/). Once you have docker installed simply type:
+For instruction how to use *cmv* please see the [Help page.](http://www.gapjunction.eu/cmvs/help)
 
-       docker run -i -t quay.io/biocontainers/cmv:1.0.5--0 /bin/bash
+## Installation
+For Linux we recommend installation via bioconda, for macOS usage of the docker container.
+The example input files used in the webservice (EGF, Piwi, Hammerhead Clan, tRNA Clan) can be retrieved here: [Example input](http://www.gapjunction.eu/data/cmvs/exampleInput.zip)
 
-### Installation via bioconda
+### Installation via bioconda - Linux
 
 *cmv* can be installed with all dependencies via [conda](https://conda.io/docs/install/quick.html). Once you have conda installed simply type:
 
        conda install -c bioconda -c conda-forge cmv
        
+### Usage via biocontainer docker - MacOS
+
+*cmv* can be retrieved and used as docker container with all dependencies via [docker](https://docs.docker.com/engine/installation/). Once you have docker installed simply type:
+
+       docker run -i -t quay.io/biocontainers/cmv:1.0.7--0 /bin/bash
+
 ### Installation via cabal-install
 
 cmv is implemented in Haskell and can be installed via the Haskell package distribution sytem [cabal](https://www.haskell.org/cabal/). CMV is implemented in Haskell and can be installed via the Haskell package distribution sytem cabal. Additionally to cabal you require [cairo](https://cairographics.org/), [pango](http://www.pango.org/), [happy](https://www.haskell.org/happy/) and [alex](https://www.haskell.org/alex/) which can be installed via the distribution package manager e.g. Ubuntu: 
@@ -40,9 +44,9 @@
 
 ### Precompiled Executables
 
-* Linux (ghc-8.0.2) [HMMV 1.0.3 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/HMMV)
-* Linux (ghc-8.0.2) [HMMCV 1.0.3 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/HMMCV)
-* Linux (ghc-8.0.2) [CMV 1.0.2 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMV)
-* Linux (ghc-8.0.2) [CMCV 1.0.2 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMCV)
-* Linux (ghc-8.0.2) [CMCV 1.0.2 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMCWStoCMCV)
+* Linux (ghc-8.2.2) [HMMV 1.0.7 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/HMMV)
+* Linux (ghc-8.2.2) [HMMCV 1.0.7 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/HMMCV)
+* Linux (ghc-8.2.2) [CMV 1.0.7 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMV)
+* Linux (ghc-8.2.2) [CMCV 1.0.7 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMCV)
+* Linux (ghc-8.2.2) [CMCV 1.0.7 x86_64](http://www.bioinf.uni-freiburg.de/~egg/cmvs/bin/CMCWStoCMCV)
    
diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,4 +1,7 @@
 -*-change-log-*-
+1.0.7 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 15. January 2018
+	* Improved placment of index labels
+	* Prepared for layout direction extension
 1.0.6 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 26. September 2017
 	* Fixed a missing output bug in HMMCV
 1.0.5 Florian Eggenhofer <egg@informatik.uni-freiburg.de> 18. September 2017
diff --git a/cmv.cabal b/cmv.cabal
--- a/cmv.cabal
+++ b/cmv.cabal
@@ -1,12 +1,12 @@
 name:                cmv
-version:             1.0.6
+version:             1.0.7
 synopsis:            Detailed visualization of CMs, HMMs and their comparisions
 description:         cmv is a collection of tools for the visualisation of Hidden Markov Models (HMMV) and RNA-family models (CMV). Moreover it can visualise comparisons of these models (HMMCV,CMCV), and annotate linked regions in the structural alignments they were constructed from and via, 3rd party tools, in their consensus secondary structure.
 license:             GPL-3
 license-file:        LICENSE
 author:              Florian Eggenhofer
 maintainer:          egg@informatik.uni-freiburg.de
-Tested-With: GHC == 8.0.2, GHC == 8.2.1          
+Tested-With: GHC == 8.0.2, GHC == 8.2.2
 category:            Bioinformatics
 build-type:          Simple
 cabal-version:       >=1.8
@@ -20,8 +20,8 @@
 
 source-repository this
   type:     git
-  location: https://github.com/eggzilla/cmv/tree/1.0.6
-  tag:      1.0.6
+  location: https://github.com/eggzilla/cmv/tree/1.0.7
+  tag:      1.0.7
 
 library
   -- Modules exported by the library.
@@ -32,7 +32,7 @@
   ghc-options:         -Wall
 
   -- Other library packages from which modules are imported.
-  build-depends:       base >=4.5 && <5, parsec>=3.1.9, diagrams-lib, BiobaseInfernal, text, vector, ParsecTools, diagrams-cairo, filepath, colour, PrimitiveArray, BiobaseXNA, mtl, directory, either-unwrap, SVGFonts>=1.6.0.2, BioHMM>=1.2.0, StockholmAlignment>=1.1.1, BiobaseTypes,containers,diagrams-core
+  build-depends:       base >=4.5 && <5, parsec>=3.1.9, diagrams-lib, BiobaseInfernal, text, vector, ParsecTools, diagrams-cairo, filepath, colour, PrimitiveArray, BiobaseXNA, mtl, directory, either-unwrap, SVGFonts>=1.6.0.2, BioHMM>=1.2.0, StockholmAlignment>=1.1.2, BiobaseTypes,containers,diagrams-core
   
   -- Directories containing source files.
   hs-source-dirs:      src
@@ -41,13 +41,13 @@
   Hs-Source-Dirs:      ./src/cmcv/
   main-is:	       CMCVisualisation.hs
   ghc-options:         -Wall
-  build-depends:       base >=4.5, cmdargs, BiobaseInfernal==0.8.1.0, BiobaseXNA, diagrams-lib>=1.4.1.2, parsec, colour, containers, bytestring, template-haskell, text, vector, directory, cmv, either-unwrap, filepath, StockholmAlignment>=1.1.1
+  build-depends:       base >=4.5, cmdargs, BiobaseInfernal==0.8.1.0, BiobaseXNA, diagrams-lib>=1.4.1.2, parsec, colour, containers, bytestring, template-haskell, text, vector, directory, cmv, either-unwrap, filepath, StockholmAlignment>=1.1.2
 
 executable CMV
   Hs-Source-Dirs:      ./src/cmv/
   main-is:	       CMVisualisation.hs
   ghc-options:         -Wall 
-  build-depends:       base >=4.5, cmdargs, BiobaseInfernal==0.8.1.0, BiobaseXNA, diagrams-lib, parsec, colour, containers, bytestring, template-haskell, text, vector, directory, cmv, either-unwrap, filepath, StockholmAlignment>=1.1.1
+  build-depends:       base >=4.5, cmdargs, BiobaseInfernal==0.8.1.0, BiobaseXNA, diagrams-lib, parsec, colour, containers, bytestring, template-haskell, text, vector, directory, cmv, either-unwrap, filepath, StockholmAlignment>=1.1.2
 
 executable CMCWStoCMCV
   Hs-Source-Dirs:      ./src/cmcv/
@@ -77,10 +77,10 @@
   Hs-Source-Dirs:      ./src/hmmcv/
   main-is:	       HMMCVisualisation.hs
   ghc-options:         -Wall
-  build-depends:       base >=4.5, cmdargs, diagrams-lib, parsec, colour, containers, bytestring, text, vector, directory, cmv, either-unwrap, filepath, BioHMM>=1.2.0, StockholmAlignment>=1.1.1
+  build-depends:       base >=4.5, cmdargs, diagrams-lib, parsec, colour, containers, bytestring, text, vector, directory, cmv, either-unwrap, filepath, BioHMM>=1.2.0, StockholmAlignment>=1.1.2
 
 executable HMMV
   Hs-Source-Dirs:      ./src/hmmv/
   main-is:	       HMMVisualisation.hs
   ghc-options:         -Wall
-  build-depends:       base >=4.5, cmdargs, diagrams-lib, parsec, colour, containers, bytestring, text, vector, directory, cmv, either-unwrap, filepath, BioHMM>=1.2.0, StockholmAlignment>=1.1.1
+  build-depends:       base >=4.5, cmdargs, diagrams-lib, parsec, colour, containers, bytestring, text, vector, directory, cmv, either-unwrap, filepath, BioHMM>=1.2.0, StockholmAlignment>=1.1.2
diff --git a/src/Bio/CMDraw.hs b/src/Bio/CMDraw.hs
--- a/src/Bio/CMDraw.hs
+++ b/src/Bio/CMDraw.hs
@@ -47,9 +47,9 @@
 import Data.Function    
 
 -- | Draw one or more CM
-drawSingleCMComparisons :: String -> Int -> Double -> String -> String -> Double -> Double -> [CM.CM] -> [Maybe StockholmAlignment] -> [CmcompareResult] -> [(QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))]
-drawSingleCMComparisons modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef cms alns comparisons = diagrams
-  where diagrams = map (drawCM modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef nameColorVector) zippedInput
+drawSingleCMComparisons :: String -> String -> Int -> Double -> String -> String -> Double -> Double -> [CM.CM] -> [Maybe StockholmAlignment] -> [CmcompareResult] -> [(QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))]
+drawSingleCMComparisons layoutDirection modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef cms alns comparisons = diagrams
+  where diagrams = map (drawCM layoutDirection modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef nameColorVector) zippedInput
         zippedInput = zip4 cms alns comparisonNodeLabels (V.toList colorVector)
         modelNumber = length cms
         comparisonNodeLabels = map (getComparisonNodeLabels comparisons nameColorVector) cms
@@ -58,16 +58,16 @@
         nameColorVector = V.zipWith (\a b -> (a,b)) modelNames colorVector
 
 -- | Draw one or more CM
-drawSingleCMs :: String -> Int -> Double -> String -> String -> Double -> Double -> [CM.CM] -> [Maybe StockholmAlignment] -> [(QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))]
-drawSingleCMs modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef cms alns = map (drawCM modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef emptyColorNameVector) zippedInput
+drawSingleCMs :: String -> String -> Int -> Double -> String -> String -> Double -> Double -> [CM.CM] -> [Maybe StockholmAlignment] -> [(QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))]
+drawSingleCMs layoutDirection modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef cms alns = map (drawCM layoutDirection modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef emptyColorNameVector) zippedInput
     where zippedInput = zip4 cms alns comparisonNodeLabels colorList
           comparisonNodeLabels = map getBlankComparisonNodeLabels cms
           colorList = replicate (length cms) white
           emptyColorNameVector = V.empty
 
 -- | Draw the guide Tree of a single CM
-drawCM :: String -> Int -> Double -> String -> String -> Double -> Double -> V.Vector (String,Colour Double) -> (CM.CM,Maybe StockholmAlignment,V.Vector (Int,V.Vector (Colour Double)), Colour Double) -> (QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))
-drawCM modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef nameColorVector (inputCM,aln,comparisonNodeLabels,modelColor)
+drawCM :: String -> String -> Int -> Double -> String -> String -> Double -> Double -> V.Vector (String,Colour Double) -> (CM.CM,Maybe StockholmAlignment,V.Vector (Int,V.Vector (Colour Double)), Colour Double) -> (QDiagram Cairo V2 Double Any,Maybe (QDiagram Cairo V2 Double Any))
+drawCM layoutDirection modelDetail entryNumberCutoff transitionCutoff modelLayout emissiontype maxWidth scalef nameColorVector (inputCM,aln,comparisonNodeLabels,modelColor)
    | modelLayout == "tree" = ((applyAll ([bg white]) modelTreeLayout),alignmentDiagram)
    | modelLayout == "flat" = ((applyAll ([bg white]) modelFlatLayout),alignmentDiagram)
    | otherwise = ((applyAll ([bg white])modelTreeLayout),alignmentDiagram)
@@ -80,15 +80,16 @@
          indices = V.toList (V.iterateN (nodeNumber-1) (1+) 0)
          (indexStructure,_)= runState (buildTreeIndexStructure 1 nodes indices) startState
          modelName = CM._name inputCM
+         currentCat = if layoutDirection == "vertical" then vcat' with {_sep=0.01} else hcat' with {_sep=0.01}
          modelFlatLayout = alignTL (vcat' with {_sep=0.1} [modelHeader,nodeTransitions]) # scale scalef
          modelTreeLayout = alignTL (vcat' with {_sep=0.1} [modelHeader,nodeTreeTransitions]) #scale scalef
          nodeTreeTransitions = applyAll (arrowList ++ labelList) nodesTree
          nodeTransitions = applyAll (arrowList ++ labelList) nodesFlat
          firstInterval = fromJust (find (\(_,p,_,_,_) -> p == 0) (fst indexStructure))
-         nodesTree = drawCMNodeTree modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes (fst indexStructure) firstInterval
+         nodesTree = drawCMNodeTree layoutDirection modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes (fst indexStructure) firstInterval
          modelHeader = makeModelHeader (T.unpack modelName) modelColor nameColorVector
          nodeIndices = V.iterateN nodeNumber (1+) 0
-         nodesFlat = vcat' with {_sep=0.01} (V.toList (V.map (drawCMNode modelDetail alphabetSymbols emissiontype boxlength (0 :: Int) nodeNumber nodeNumber allStates comparisonNodeLabels nodes) nodeIndices))
+         nodesFlat = currentCat (V.toList (V.map (drawCMNode layoutDirection modelDetail alphabetSymbols emissiontype boxlength (0 :: Int) nodeNumber nodeNumber allStates comparisonNodeLabels nodes) nodeIndices))
          allConnectedStates = makeAllConnectedStates allStates
          highConnectedStates = V.filter (\(_,_,w) -> w >= transitionCutoff) allConnectedStates
          connectedStates = V.filter (\(stateId,targetStateIndex,_) -> stateId /= targetStateIndex) highConnectedStates
@@ -489,22 +490,28 @@
 setModelName :: String -> QDiagram Cairo V2 Double Any
 setModelName t = textSVG_ (TextOpts linLibertineFont INSIDE_H KERN False 20 20) t # fc black # fillRule EvenOdd # lw 0.0 # translate (r2 (negate 0.75, negate 0.75))
 
-drawCMNodeTree :: String -> String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double))-> V.Vector CM.Node -> [(Int, Int, String, Int, Int)] -> (Int,Int,String,Int,Int) -> QDiagram Cairo V2 Double Any
-drawCMNodeTree modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes indexStructure (intervalId,parentId,intervalType,currentIndex,currentEnd) = nodeTree
-  where nodeTree = currentIntervalDrawing === hcat' with {_sep = 20} (map (drawCMNodeTree modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes indexStructure) nextIntervals)
+drawCMNodeTree :: String -> String -> String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double))-> V.Vector CM.Node -> [(Int, Int, String, Int, Int)] -> (Int,Int,String,Int,Int) -> QDiagram Cairo V2 Double Any
+drawCMNodeTree layoutDirection modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes indexStructure (intervalId,parentId,intervalType,currentIndex,currentEnd) = nodeTree
+  where nodeTree = if layoutDirection == "vertical" then verticalNodeTree else horizontalNodeTree
+        verticalNodeTree = currentIntervalDrawing === hcat' with {_sep = 20} (map (drawCMNodeTree layoutDirection modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes indexStructure) nextIntervals)
+        horizontalNodeTree = currentIntervalDrawing ||| vcat' with {_sep = 20} (map (drawCMNodeTree layoutDirection modelDetail alphabetSymbols emissiontype boxlength allStates comparisonNodeLabels nodes indexStructure) nextIntervals)
         nextIntervals = filter (\(_,p,_,_,_) -> intervalId == p) indexStructure
-        currentIntervalDrawing = drawCMNodeInterval modelDetail alphabetSymbols emissiontype boxlength currentIndex currentEnd currentEnd allStates comparisonNodeLabels nodes (intervalId,parentId,intervalType,currentIndex,currentEnd)  --- ||| (text' (show intervalId ++ "I" ++ show indexStructure) <> rect 100 100)
+        currentIntervalDrawing = drawCMNodeInterval layoutDirection modelDetail alphabetSymbols emissiontype boxlength currentIndex currentEnd currentEnd allStates comparisonNodeLabels nodes (intervalId,parentId,intervalType,currentIndex,currentEnd)  --- ||| (text' (show intervalId ++ "I" ++ show indexStructure) <> rect 100 100)
 
 --drawCMNodeRow :: String -> String -> String -> Int -> Int -> Int -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double))-> V.Vector CM.Node -> [(Int, Int, String, Int, Int)] -> QDiagram Cairo V2 Double Any
 --drawCMNodeRow modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes intervals = strutY 4 === hcat' with { _sep = 8 } (map (drawCMNodeInterval modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes) intervals)
 
-drawCMNodeInterval :: String -> String -> String -> Int -> Int -> Int -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double))-> V.Vector CM.Node -> (Int, Int, String, Int, Int) -> QDiagram Cairo V2 Double Any
-drawCMNodeInterval modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes (intervalId,_,_,currentIndex,currentEnd)
+drawCMNodeInterval :: String -> String -> String -> String -> Int -> Int -> Int -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double))-> V.Vector CM.Node -> (Int, Int, String, Int, Int) -> QDiagram Cairo V2 Double Any
+drawCMNodeInterval layoutDirection modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes (intervalId,_,_,currentIndex,currentEnd)
   | modelDetail == "interval" = intervalVis
   | otherwise = nodeVis
-  where intervalVis = rect 20 0 # named ("a" ++ intervalIdString)  # lw 0.0 === (rect 20 40 # lw 0.1 <> text' (show currentIndex ++ "-" ++ show currentEnd)) === rect 20 0 # named ("e" ++ intervalIdString)  # lw 0.0 === strutY 5.0
+  where intervalVis = if layoutDirection == "vertical" then verticalIntervalVis else horizontalIntervalVis
+        verticalIntervalVis = rect 20 0 # named ("a" ++ intervalIdString)  # lw 0.0 === (rect 20 40 # lw 0.1 <> text' (show currentIndex ++ "-" ++ show currentEnd)) === rect 20 0 # named ("e" ++ intervalIdString)  # lw 0.0 === strutY 5.0
+        horizontalIntervalVis = rect 20 0 # named ("a" ++ intervalIdString)  # lw 0.0 ||| (rect 20 40 # lw 0.1 <> text' (show currentIndex ++ "-" ++ show currentEnd)) ||| rect 20 0 # named ("e" ++ intervalIdString)  # lw 0.0 ||| strutX 5.0
         intervalIdString = show intervalId
-        nodeVis = strutY 4  ===vcat' with { _sep = nodespacer } (map (drawCMNode modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes) currentInterval)
+        nodeVis = if layoutDirection == "vertical" then verticalNodeVis else horizontalNodeVis
+        verticalNodeVis = strutY 4  === vcat' with { _sep = nodespacer } (map (drawCMNode layoutDirection modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes) currentInterval)
+        horizontalNodeVis = strutX 5 ||| hcat' with { _sep = nodespacer } (map (drawCMNode layoutDirection modelDetail alphabetSymbols emissiontype boxlength rowStart rowEnd lastIndex states comparisonNodeLabels nodes) currentInterval)
         currentInterval = [currentIndex..currentEnd]
         nodespacer = if modelDetail == "detailed" then (0 :: Double) else (0.5 :: Double)
 
@@ -541,30 +548,31 @@
 --   | label == "END"  = sRGB24 245 245 245 -- E
 --labelToColor _ = sRGB24 245 245 245
 
-drawCMNode :: String -> String -> String -> Int -> Int -> Int -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> V.Vector CM.Node -> Int -> QDiagram Cairo V2 Double Any
-drawCMNode modelDetail alphabetSymbols emissiontype boxlength _ _ _ states comparisonNodeLabels nodes nodeIndex
-  | modelDetail == "minimal" = drawCMMinimalNodeBox alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
-  | modelDetail == "simple" = drawCMSimpleNodeBox alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
+drawCMNode :: String -> String -> String -> String -> Int -> Int -> Int -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> V.Vector CM.Node -> Int -> QDiagram Cairo V2 Double Any
+drawCMNode layoutDirection modelDetail alphabetSymbols emissiontype boxlength _ _ _ states comparisonNodeLabels nodes nodeIndex
+  | modelDetail == "minimal" = drawCMMinimalNodeBox layoutDirection alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
+  | modelDetail == "simple" = drawCMSimpleNodeBox layoutDirection alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
   | otherwise = detailedNodeBox
   where node = nodes V.! nodeIndex
         --idNumber = nodeIndex
         --nId = show idNumber
-        detailedNodeBox = drawCMDetailedNodeBox alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
+        detailedNodeBox = drawCMDetailedNodeBox layoutDirection alphabetSymbols emissiontype boxlength states comparisonNodeLabels node nodeIndex
         --nodeType = getCMNodeType node
         --nodeLabels = V.toList (snd (comparisonNodeLabels V.! idNumber))
 
 colorBox :: Double -> Colour Double -> QDiagram Cairo V2 Double Any
 colorBox singleBoxYLength colColour = rect 5 singleBoxYLength # fc colColour # lw 0.1
 
-drawCMMinimalNodeBox :: String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
-drawCMMinimalNodeBox alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
-  | ntype == CM.Bif = minimalNode === splitStatesBox -- bifNode 
-  | ntype == CM.BegL = splitStatesBox === minimalNode -- begLNode 
-  | ntype == CM.BegR = splitStatesBox === minimalNode -- begRNode 
+drawCMMinimalNodeBox :: String -> String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
+drawCMMinimalNodeBox layoutDirection alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
+  | ntype == CM.Bif = currentCat minimalNode  splitStatesBox -- bifNode 
+  | ntype == CM.BegL = currentCat splitStatesBox minimalNode -- begLNode 
+  | ntype == CM.BegR = currentCat splitStatesBox minimalNode -- begRNode 
   | otherwise = minimalNode
     where ntype = CM._nodeType node
           idNumber = nodeIndex
           nId = show idNumber
+          currentCat = if layoutDirection == "vertical" then (===) else (|||)
           stateIndices = V.toList (CM._nodeStates node)
           minimalNode = rect 5 5 # lw 0.1 # lc black <> text' nId # fontSize 2  <> wheel 2 nodeLabels # lw 0.1 # lc black
           splitStatesBox = hcat (map (drawCMSimpleStateBox nId alphabetSymbols emissiontype boxlength currentStates) stateIndices)
@@ -575,15 +583,16 @@
           --singleBoxYLength = totalBoxYlength / boxNumber
           --colourBoxes = vcat (map (colorBox singleBoxYLength) nodeLabels)
 
-drawCMSimpleNodeBox :: String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
-drawCMSimpleNodeBox alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
-  | ntype == CM.Bif = simpleNode === splitStatesBox -- bifNode 
-  | ntype == CM.BegL = splitStatesBox === simpleNode -- begLNode 
-  | ntype == CM.BegR = splitStatesBox === simpleNode -- begRNode 
+drawCMSimpleNodeBox :: String -> String -> String -> Int -> M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
+drawCMSimpleNodeBox layoutDirection alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
+  | ntype == CM.Bif = currentCat simpleNode splitStatesBox -- bifNode 
+  | ntype == CM.BegL = currentCat splitStatesBox simpleNode -- begLNode 
+  | ntype == CM.BegR = currentCat splitStatesBox simpleNode -- begRNode 
   | otherwise = simpleNode
     where ntype = CM._nodeType node
           idNumber = nodeIndex 
           nId = show idNumber
+          currentCat = if layoutDirection == "vertical" then (===) else (|||)
           stateIndices = V.toList (CM._nodeStates node)
           simpleNode = rect 10 5 # lw 0.1 # lc black <>  ((text' nId # translate (r2 (negate 7.5,0)) <> colourBoxes # translate (r2 (negate 7.5, boxYoffset))) ||| text' nodeType # translate (r2 (14,0)))
           splitStatesBox = hcat (map (drawCMSimpleStateBox nId alphabetSymbols emissiontype boxlength currentStates) stateIndices)
@@ -607,8 +616,8 @@
           sState = rect 1 0.001 # lw 0 # named ("a" ++ stateIndx)
           bState = rect 1 0.001 # lw 0 # named ("e" ++ stateIndx)
 
-drawCMDetailedNodeBox :: String -> String -> Int ->  M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
-drawCMDetailedNodeBox alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
+drawCMDetailedNodeBox :: String -> String -> String -> Int ->  M.Map (PI.PInt () CM.StateIndex) CM.State -> V.Vector (Int, V.Vector (Colour Double)) -> CM.Node -> Int -> QDiagram Cairo V2 Double Any
+drawCMDetailedNodeBox layoutDirection alphabetSymbols emissiontype boxlength currentStates comparisonNodeLabels node nodeIndex
   | ntype == CM.Bif = bifNode # translate (r2 (negate 25,25)) <> nodeBox
   | ntype == CM.MatP = matPNode # translate (r2 (negate 25,25)) <> nodeBox
   | ntype == CM.MatL = matLNode # translate (r2 (negate 25,25)) <> nodeBox
diff --git a/src/cmcv/CMCVisualisation.hs b/src/cmcv/CMCVisualisation.hs
--- a/src/cmcv/CMCVisualisation.hs
+++ b/src/cmcv/CMCVisualisation.hs
@@ -32,6 +32,7 @@
   { cmcompareResultFile :: String,
     modelsFile :: String,
     alignmentFile :: String,
+--    layoutDirection :: String,
     modelDetail :: String,
     modelLayout :: String,
     emissionLayout :: String,
@@ -50,6 +51,7 @@
   { cmcompareResultFile = def &= name "r" &= help "Path to CMCompare result file",
     modelsFile = def &= name "m" &= help "Path to covariance model file",
     alignmentFile = "" &= name "s" &= help "Path to stockholm alignment file",
+--    layoutDirection = "vertical" &= name "g" &= help "Set in which direction the model is drawn: vertical, horizontal (Default: vertical)",
     modelDetail = "detailed" &= name "d" &= help "Set verbosity of drawn models: minimal, simple, detailed",
     modelLayout = "tree" &= name "l" &= help "Set layout of drawn models: flat, tree",
     emissionLayout = "box" &= name "e" &= help "Set layout of drawn models: score, probability, box (Default: box)",
@@ -79,6 +81,7 @@
        Control.Monad.when (isLeft alnInput) $ print (E.fromLeft alnInput)
        --let outputName = diagramName "cmcv" outputFormat
        let modelNumber = length cms
+       let layoutDirection = "vertical"
        let alns = if isRight alnInput then map (\a -> Just a) (E.fromRight alnInput) else replicate modelNumber Nothing
        let currentModelNames = map (T.unpack . CM._name) cms
        currentWD <- getCurrentDirectory
@@ -87,7 +90,7 @@
        let modelFileNames = map (\m -> m ++ "." ++ outputFormat) currentModelNames
        let alignmentFileNames = map (\m -> m ++ ".aln" ++ "." ++ outputFormat) currentModelNames
        setCurrentDirectory dirPath
-       let (modelVis,alignmentVis) = unzip $ drawSingleCMComparisons modelDetail alignmentEntries transitionCutoff modelLayout emissionLayout maxWidth scalingFactor cms alns comparisons
+       let (modelVis,alignmentVis) = unzip $ drawSingleCMComparisons layoutDirection modelDetail alignmentEntries transitionCutoff modelLayout emissionLayout maxWidth scalingFactor cms alns comparisons
        mapM_ (\(a,b) -> printCM a svgsize b) (zip modelFileNames modelVis)
        mapM_ (\(alnPath,stockholm) -> if isJust stockholm then printCM alnPath svgsize (fromJust stockholm) else return ()) (zip alignmentFileNames alignmentVis)
        let structureVisType = "perModel"
diff --git a/src/cmv/CMVisualisation.hs b/src/cmv/CMVisualisation.hs
--- a/src/cmv/CMVisualisation.hs
+++ b/src/cmv/CMVisualisation.hs
@@ -29,6 +29,7 @@
 data Options = Options
   { modelFile :: String,
     alignmentFile :: String,
+--    layoutDirection :: String,
     modelDetail :: String,
     modelLayout :: String,
     emissionLayout :: String,
@@ -45,6 +46,7 @@
 options = Options
   { modelFile = def &= name "m" &= help "Path to covariance model file",
     alignmentFile = "" &= name "s" &= help "Path to stockholm alignment file",
+--    layoutDirection = "vertical" &= name "g" &= help "Set in which direction the model is drawn: vertical, horizontal (Default: vertical)",
     modelDetail = "detailed" &= name "d" &= help "Set verbosity of drawn models: minimal, simple, detailed",
     modelLayout = "tree" &= name "l" &= help "Set layout of drawn models: flat, tree",
     emissionLayout = "box" &= name "e" &= help "Set layout of drawn models: score, probability, box (Default: box)",
@@ -71,6 +73,7 @@
           Control.Monad.when (isLeft alnInput) $ print (fromLeft alnInput)
           --let outputName = diagramName "cmv" outputFormat
           let modelNumber = length cms
+	  let layoutDirection = "vertical"
           let alns = if isRight alnInput then map (\a -> Just a) (fromRight alnInput) else replicate modelNumber Nothing
           let currentModelNames = map (T.unpack . CM._name) cms
           currentWD <- getCurrentDirectory
@@ -79,7 +82,7 @@
           let modelFileNames = map (\m -> m ++ "." ++ outputFormat) currentModelNames
           let alignmentFileNames = map (\m -> m ++ ".aln" ++ "." ++ outputFormat) currentModelNames
           setCurrentDirectory dirPath
-          let (modelVis,alignmentVis)= unzip $ drawSingleCMs modelDetail alignmentEntries transitionCutoff modelLayout emissionLayout maxWidth scalingFactor cms alns
+          let (modelVis,alignmentVis)= unzip $ drawSingleCMs layoutDirection modelDetail alignmentEntries transitionCutoff modelLayout emissionLayout maxWidth scalingFactor cms alns
           mapM_ (\(a,b) -> printCM a svgsize b) (zip modelFileNames modelVis)
           mapM_ (\(alnPath,stockholm) -> if isJust stockholm then printCM alnPath svgsize (fromJust stockholm) else return ()) (zip alignmentFileNames alignmentVis)
           let structureVisType = "perModel"
