diff --git a/AUTHORS b/AUTHORS
new file mode 100644
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+This parser and associated example programs were created by:
+Michal J. Gajda 2010-2013
+In his free time, unencumbered by work duties.
diff --git a/INSTALL b/INSTALL
new file mode 100644
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,7 @@
+With a modern Cabal one can install dependencies with:
+`cabal install`.
+
+Some dependencies may require GL/GLUT library headers.
+
+On Ubuntu one can install them using:
+apt-get install freeglut3-dev libgl1-mesa-dev
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+hPDB - examples
+===============
+Haskell PDB file format parser - example scripts.
+
+[![Build Status](https://api.travis-ci.org/mgajda/hPDB-examples.png?branch=master)](https://www.travis-ci.org/mgajda/hPDB-examples)
+
+Details on official releases are on [Hackage](http://hackage.haskell.org/package/hPDB-examples).
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,4 +1,18 @@
 #! /usr/bin/env runhaskell
 
+module Main(main) where
+
 import Distribution.Simple
-main = defaultMain
+import System.Environment
+import Control.Monad(when)
+import Data.List(isPrefixOf)
+
+-- Defaults to installing in --user package database.
+isPkgDbOpts arg = ("--package-db" `isPrefixOf` arg  ) || (arg `elem` ["--user", "--global"])
+haveNotPkgDbOpts   = not . any isPkgDbOpts
+
+main = do args <- getArgs
+          defaultMainArgs $ if (length args > 0 && (head args `elem` ["configure", "install"]) && haveNotPkgDbOpts args)
+                              then (head args:"--user":tail args)
+                              else args
+            
diff --git a/examples/CanonicalAxes.hs b/examples/CanonicalAxes.hs
--- a/examples/CanonicalAxes.hs
+++ b/examples/CanonicalAxes.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE OverloadedStrings, BangPatterns, FlexibleInstances,UndecidableInstances  #-}
-
 module Main where
 
 import Control.Monad(when)
@@ -14,18 +13,19 @@
 import Data.List
 import Text.Printf
 
+--ifoldrPairs :: (Iterable Structure b, Iterable Structure b1) =>(t -> c -> c) -> (b -> b1 -> t) -> c -> Structure -> c
 ifoldrPairs fred fpair e s = pairs
   where
     pairs' a cont = It.ifoldr (\at r -> (at `fpair` a) `fred` r) cont (s :: Structure)
-    pairs         = It.ifoldr (\at r -> pairs' at r) e                (s :: Structure)
+    pairs         = It.ifoldr pairs'                             e    (s :: Structure)
 
+--ifoldPairs :: (Iterable Structure b, Iterable Structure c) =>(c -> c -> c) -> (b -> c -> c) -> c -> Structure -> c
 ifoldPairs fred fpair e s = pairs
   where
     pairs' a cont = It.ifoldl' (\r at -> (at `fpair` a) `fred` r) cont (s :: Structure)
-    pairs         = It.ifoldl' (\r at -> pairs' at r) e                (s :: Structure)
+    pairs         = It.ifoldl' pairs'                             e    (s :: Structure)
 
 -- | findAxes finds all three principal axes so that dimensions are ordered.
--- TODO: find a way to loop v1, v2, v3 assignment
 findAxes structure = let v1    = findLongestOrthogonalVector [            ] structure
                          axis1 = vnormalise v1
                          dim1  = vnorm v1
@@ -37,27 +37,18 @@
                          dim3  = vnorm v3
                      in dim1 `seq` dim2 `seq` dim3 `seq` ([dim1, dim2, dim3], [axis1, axis2, axis3])
   where
-    findLongestOrthogonalVector axes = ifoldPairs pickMaxDist (atDistPerpend axes) nullVector 
+    findLongestOrthogonalVector axes = undefined --ifoldPairs pickMaxDist (atDistPerpend axes) nullVector 
     nullVector          = fromInteger 0
-    atDistPerpend axes !a1 !a2 = vperpends ((coord a1) - (coord a2)) axes
+    atDistPerpend ::  [Vector3] -> Atom -> Vector3 -> Vector3
+    atDistPerpend axes !a1 !a2 = vperpends (coord a1 - a2) axes
+    pickMaxDist ::  Vector3 -> Vector3 -> Vector3
     pickMaxDist !v1 !v2 = if vnorm v1 > vnorm v2 then v1 else v2
-    
 
-{-center :: Structure -> (Double, Double, Double)
-center s = (realToFrac sx, realToFrac sy, realToFrac sz)
-  where
-    
-    result  = It.ifoldr 
-    maxFst (a, b) (c, d) = if a >= c then (a, b) else (c, d)
-    coords  = [It.ifoldr (\at r -> coord (at :: PDBS.Atom) : r) [] (s :: Structure)]
--}
-
-
 main = do args <- getArgs
           when (length args /= 2) $ do hPutStrLn stderr "USAGE: CanonicalAxes <input.pdb> <output.pdb>"
                                        exitFailure
           let [inpfname, outfname] = args
-          Just structure <- PDBIO.parse $ BS.pack inpfname
+          Just structure <- PDBIO.parse inpfname
           let ([d1, d2, d3], axes@[yaxis, xaxis, zaxis]) = findAxes structure
           printf "Dimensions: %.2f %.2f %.2f\n" d1 d2 d3
           putStr "Axis 1 (Y): "
diff --git a/examples/CleanPDB.hs b/examples/CleanPDB.hs
--- a/examples/CleanPDB.hs
+++ b/examples/CleanPDB.hs
@@ -18,7 +18,7 @@
                return r
 
 runCounterM :: CounterM a -> a
-runCounterM = fst . (flip runState) 1
+runCounterM = fst . flip runState 1
 
 renumberResidues :: (Iterable s Chain) => s -> s
 renumberResidues = imap (\ch -> runCounterM          .
@@ -40,8 +40,8 @@
                          return $ at { atSerial = v }
 
 main = do [inpfname, outfname] <- getArgs
-          Just structure <- PDB.parse $ BS.pack inpfname
+          Just structure <- PDB.parse inpfname
           putStrLn $ show (PDB.numAtoms structure) ++ " atoms."
-          let s1 = renumberResidues $ renumberAtoms $ structure
-          PDB.write s1 $ BS.pack outfname
+          let s1 = renumberResidues $ renumberAtoms structure
+          PDB.write s1 outfname
 
diff --git a/examples/PDB2Fasta.hs b/examples/PDB2Fasta.hs
--- a/examples/PDB2Fasta.hs
+++ b/examples/PDB2Fasta.hs
@@ -2,14 +2,14 @@
 module Main(main) where
 
 import System.Environment(getProgName, getArgs)
-import System.Exit(exitWith, ExitCode(ExitSuccess), ExitCode(..))
+import System.Exit(exitWith, exitSuccess, ExitCode(ExitSuccess), ExitCode(..))
 import System.Console.GetOpt
 import Bio.PDB as PDB
-import Bio.PDB.Fasta(fastaRecord)
 import qualified Data.ByteString.Char8 as BS
 import qualified Data.Map as Map
 import Bio.PDB.Fasta
 import Control.Monad(when)
+import Data.Foldable(forM_)
 
 data Options = Options { gapped    :: Bool,
                          allModels :: Bool
@@ -47,12 +47,12 @@
   args <- getArgs
   let (actions, filenames, opts) = getOpt RequireOrder options args
   opts <- foldl (>>=) (return defaultOptions) actions
-  when (length filenames == 0) $ exitAfter showHelp (ExitFailure 3) undefined
+  when (null filenames) $ exitAfter showHelp (ExitFailure 3) undefined
   mapM_ (processFile opts) filenames
-  exitWith ExitSuccess -- TODO: only if no errors!
+  exitSuccess -- TODO: only if no errors!
 -- | This program loads a PDB file and outputs FASTA sequences of all chains within
 
-printFastaRecords :: Options -> [Char] -> Structure -> IO ()
+printFastaRecords :: Options -> FilePath -> Structure -> IO ()
 printFastaRecords opts fname s = if allModels opts
                                    then
                                      process s
@@ -68,8 +68,6 @@
 
 --printFastaRecords fname s = PDB.ifoldM (\() ch -> Prelude.putStrLn $ fastaRecord fname ch) () s
 
-processFile opts fname = do maybePDB <- PDB.parse $ BS.pack fname
-                            case maybePDB of
-                              Nothing        -> return ()
-                              Just structure -> printFastaRecords opts fname structure
+processFile opts fname = do maybePDB <- PDB.parse fname
+                            forM_ maybePDB $ printFastaRecords opts fname
 
diff --git a/examples/Rg.hs b/examples/Rg.hs
--- a/examples/Rg.hs
+++ b/examples/Rg.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, BangPatterns, FlexibleContexts, OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, BangPatterns, FlexibleContexts #-}
 module Main(main) where
 
 import Bio.PDB as PDB
@@ -14,8 +14,8 @@
 import Bio.PDB.Structure.Elements(atomicMass, assignElement)
 
 main = do args <- getArgs
-          mapM (readAndComputeRg . BS.pack) args
-          exitWith ExitSuccess
+          mapM_ readAndComputeRg args
+          exitSuccess
 
 readAndComputeRg filename =
   do Just structure <- PDB.parse filename
@@ -25,7 +25,7 @@
      hFlush stdout
      rnf structure `seq` BS.putStrLn " atoms!"
      rg <- return $! radiusOfGyration structure
-     printf "%s: %.2f\n" (BS.unpack filename) rg 
+     printf "%s: %.2f\n" filename rg 
      return rg
 
 -- TODO: consider mass of an atom
@@ -35,8 +35,8 @@
 radiusOfGyration structure = avgDistDev
   where
     -- (c -> b -> c) -> c -> a -> c
-    avgDistDev = sqrt ((ifoldl' addDistDev 0.0 structure)/totalMass)
-    addDistDev !total at = total + (vnorm $ coord at - center)**2 * atMass at
+    avgDistDev = sqrt (ifoldl' addDistDev 0.0 structure/totalMass)
+    addDistDev !total at = total + vnorm (coord at - center)**2 * atMass at
     atMass :: Atom -> Double
     atMass at = atomicMass $ case assignElement at of
                                ""        -> "C"
diff --git a/examples/ShiftToCenter.hs b/examples/ShiftToCenter.hs
--- a/examples/ShiftToCenter.hs
+++ b/examples/ShiftToCenter.hs
@@ -22,9 +22,9 @@
     subCoord (at@Atom { coord = c }) = at { coord = c - v }
 
 main = do [inpfname, outfname] <- getArgs
-          Just structure <- PDB.parse $ BS.pack inpfname
+          Just structure <- PDB.parse inpfname
           let c@(Vector3 x y z) = center structure
           printf "Center %.2f %.2f %.2f\n" x y z
           putStrLn $ show (PDB.numAtoms structure) ++ " atoms."
           let s1 = shift c structure
-          PDB.write s1 $ BS.pack outfname
+          PDB.write s1 outfname
diff --git a/examples/SplitModels.hs b/examples/SplitModels.hs
--- a/examples/SplitModels.hs
+++ b/examples/SplitModels.hs
@@ -19,16 +19,16 @@
 splitModels aStructure = map mkStructure . V.toList . models $ aStructure
   where mkStructure aModel = aStructure{ models = V.singleton aModel }
 
-usage = do hPutStrLn stderr $ concat [ "Usage: SplitModels <input.pdb> <output_prefix>"
-                                     , "Splitting of PDB files with multiple MODEL entries." ]
+usage = do hPutStrLn stderr $ "Usage: SplitModels <input.pdb> <output_prefix>" ++
+                              "Splitting of PDB files with multiple MODEL entries."
            exitFailure
 
 main = do lenArgs <- length `fmap` getArgs
           when (lenArgs /= 2) usage
           [inpfname, outfname] <- getArgs
-          Just structure <- PDB.parse $ BS.pack inpfname
+          Just structure <- PDB.parse inpfname
           let splitted = zip [1..] $ splitModels structure
           forM splitted $ \(num, aStructure) ->
             do let fname = outfname ++ show num ++ ".pdb"
                putStrLn $ "Writing " ++ show fname ++ " with " ++ show (numAtoms aStructure) ++ " atoms."
-               PDB.write aStructure $ BS.pack fname
+               PDB.write aStructure fname
diff --git a/examples/StericClashCheck.hs b/examples/StericClashCheck.hs
--- a/examples/StericClashCheck.hs
+++ b/examples/StericClashCheck.hs
@@ -37,8 +37,8 @@
 size ot =  length . Oct.toList $ ot
 
 main = do [input1, input2] <- Env.getArgs
-          Just structure1 <- PDB.parse $ BS.pack input1
-          Just structure2 <- PDB.parse $ BS.pack input2
+          Just structure1 <- PDB.parse input1
+          Just structure2 <- PDB.parse input2
           print $ clashCheck structure1 structure2
           print "Depths:"
           print . Oct.depth . makeOctree $ structure1
diff --git a/examples/Viewer.hs b/examples/Viewer.hs
--- a/examples/Viewer.hs
+++ b/examples/Viewer.hs
@@ -15,6 +15,7 @@
 import Bio.PDB.Iterable           as PDBI
 import Data.ByteString.Char8      as BS
 import Bio.PDB.Structure.Vector
+import Data.Vector.V3
 
 data UIState = UIState { manipulationCenter :: Maybe GL.Position
                        , pressedButton      :: Maybe GL.MouseButton
@@ -24,7 +25,7 @@
                        }
 
 initialUIState = do GL.loadIdentity
-                    initialViewMatrix :: GL.GLmatrix GL.GLdouble <- GL.get $ GL.matrix $ Nothing
+                    initialViewMatrix :: GL.GLmatrix GL.GLdouble <- GL.get $ GL.matrix Nothing
                     --m <- GL.getMatrixComponents GL.ColumnMajor initialViewMatrix
                     return $ cleanUIState initialViewMatrix
 
@@ -42,14 +43,14 @@
 main = do
   (progname, [filename]) <- GL.getArgsAndInitialize
   -- First read structure
-  Just structure <- PDBIO.parse $ BS.pack filename
+  Just structure <- PDBIO.parse filename
   -- Initialize OpenGL
   --displayMode $= [With DisplayDepth, With DisplayRGB] -- is it glutInitDisplayModel (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH)
   setup progname -- setup OpenGL scene model
   -- Initialize camera
   initUIState <- initialUIState
   uiState <- newIORef initUIState
-  translateViewMatrix uiState $ vec3DToVector3 $ (-(center structure))
+  translateViewMatrix uiState $ vector3ToGLVector3 (-(center structure))
   translateViewMatrix uiState $ GL.Vector3 0 0 (-frustumMiddle)
   -- Now set callbacks
   GL.displayCallback        $= display uiState structure
@@ -105,7 +106,7 @@
 zaxis = GL.Vector3 0 0 1 :: GL.Vector3 GL.GLdouble
 
 negateVector3 :: (Num a) => GL.Vector3 a -> GL.Vector3 a
-negateVector3 = fmap (\a -> (-a))
+negateVector3 = fmap negate
 
 handleKeys :: IORef UIState -> GL.Key -> GL.KeyState -> GL.Modifiers -> GL.Position -> IO ()
 handleKeys uiState (GL.Char 'q')                    GL.Down _modifiers _position = rotateViewMatrix    uiState   10.0  yaxis
@@ -186,8 +187,8 @@
                 (GL.Position w     h    ) = (angle, GL.Vector3 dy dx 0.0)
   where
     [xf, yf, wf, hf] = Prelude.map fromIntegral [curX - initX, curY - initY, w, h]
-    dx = xf / (min hf wf)
-    dy = yf / (min hf wf)
+    dx = xf / min hf wf
+    dy = yf / min hf wf
     angle = 180.0 * sqrt (dx*dx + dy*dy)
     
 getPosChange :: GL.Position -> GL.Position -> GL.Position -> (GL.GLdouble, GL.GLdouble)
@@ -210,11 +211,11 @@
   GL.depthFunc                         $= Just GL.Less
    
 -- Assessing dimensions for initial focus
-center :: PDBS.Structure -> Vec3D
+center :: PDBS.Structure -> Vector3
 center structure = average 
   where
     (!average, _count) = PDBI.ifoldl' step (fromIntegral 0, 0) structure
-    step :: (Vec3D, Double) -> PDBS.Atom -> (Vec3D, Double)
+    step :: (Vector3, Double) -> PDBS.Atom -> (Vector3, Double)
     step (!r, !i) at = let i' = i + 1
                        in (coord at |* (1/i') + r |* (i/i'), i')
 
@@ -225,21 +226,21 @@
                                                              vzip max maxv c)) (cs, cs) structure
     !cs = center structure
 
-vec3DToVector3 :: Vec3D -> GL.Vector3 GL.GLdouble
-vec3DToVector3 v = GL.Vector3 x' y' z'
+vector3ToGLVector3 :: Vector3 -> GL.Vector3 GL.GLdouble
+vector3ToGLVector3 v = GL.Vector3 x' y' z'
   where
-    (x, y, z) = unpackVec3D v
+    Vector3 x y z = v
     [x', y', z'] :: [GL.GLdouble]  = Prelude.map realToFrac [x, y, z]
 
 renderStructure :: IORef UIState -> PDBS.Structure -> IO ()
-renderStructure uiState structure = PDBI.ifoldM (\_ -> renderAtom) () structure
+renderStructure uiState = PDBI.ifoldM (const renderAtom) ()
   where renderAtom (at :: Atom) = GL.preservingMatrix $ do GL.matrixMode $= GL.Modelview 0
                                                            uiSt <- readIORef uiState
                                                            --m :: GL.GLmatrix GL.GLdouble <- GL.newMatrix GL.ColumnMajor $ currentViewMatrix uiSt
                                                            GL.matrix Nothing $= currentViewMatrix uiSt
                                                            --cm <- GL.getMatrixComponents GL.ColumnMajor $ currentViewMatrix uiSt
                                                            --print cm
-                                                           GL.translate  $ vec3DToVector3 $ PDBS.coord at
+                                                           GL.translate  $ vector3ToGLVector3 $ PDBS.coord at
                                                            GL.renderObject GL.Solid $ GL.Sphere' (realToFrac radius) 40 32 -- much smoother looks!
           where
             radius            = realToFrac $ PDBE.vanDerWaalsRadius $ PDBS.element at
@@ -250,11 +251,12 @@
                                renderStructure uiState structure
                                GL.swapBuffers
 
+{-# ANN myOrtho "HLint: ignore Redundant bracket" #-}
 myOrtho w h = let hw = fromIntegral h/fromIntegral w
                   wh = fromIntegral w/fromIntegral h
               in if w <= h
-                   then GL.ortho (-1.5)    (1.5)    (-1.5*hw) (1.5*hw) (-10) (10)
-                   else GL.ortho (-1.5*wh) (1.5*wh) (-1.5)    (1.5)    (-10) (10)
+                   then GL.ortho (-1.5   ) (1.5   ) (-1.5*hw) (1.5*hw) (-10) (10)
+                   else GL.ortho (-1.5*wh) (1.5*wh) (-1.5   ) (1.5   ) (-10) (10)
 
 frustumFront  =    5.0
 frustumBack   = 1000.0
diff --git a/hPDB-examples.cabal b/hPDB-examples.cabal
--- a/hPDB-examples.cabal
+++ b/hPDB-examples.cabal
@@ -1,87 +1,88 @@
 name:                hPDB-examples
-version:             0.99
+version:             0.999
+synopsis:            Examples for hPDB library
 stability:           beta
-homepage:            https://github.com/mgajda/hpdb
+homepage:            https://github.com/mgajda/hpdb-examples
 package-url:         http://hackage.haskell.org/package/hPDB
-synopsis:            Parser, print and manipulate structures in PDB file format.
-description:         Protein Data Bank file format is a most popular format for holding biomolecule data. This is a very fast parser (below 7s for the largest entry in PDB - 1HTQ which is over 70MB - as compared with 11s of RASMOL 2.7.5, or 2m15s of BioPython with Python 2.6 interpreter.) It is aimed to not only deliver event-based interface, but also a high-level data structure for manipulating data in spirit of BioPython's PDB parser. 
+description:         Examples for handling Protein Data Bank file format.
 category:            Bioinformatics 
 license:             BSD3
 license-file:        LICENSE
 
 author:              Michal J. Gajda
-copyright:           Copyright by Michal J. Gajda '2009-'2012
+copyright:           Copyright by Michal J. Gajda '2009-'2013
 maintainer:          mjgajda@googlemail.com
 bug-reports:         mailto:mjgajda@googlemail.com
 
 build-type:          Simple
 cabal-version:       >=1.8
-tested-with:         GHC==7.4.1, GHC==7.0.3, GHC==7.4.2
+tested-with:         GHC==7.0.3, GHC==7.2.2, GHC==7.4.1, GHC==7.4.2, GHC==7.6.1, GHC==7.6.2
 --Need to re-test: GHC==6.12.1,  GHC==7.0.4, GHC==7.1.20101026 
 --data-files:          1CRN.pdb, 1HTQ.pdb, 3JYV.pdb
+extra-source-files:  README.md INSTALL AUTHORS
 
 source-repository head
   type:     git
-  location: git://github.com:mgajda/hpdb-examples.git
+  location: https://github.com/mgajda/hPDB-examples
 
 Executable PDB2Fasta
   main-is:          examples/PDB2Fasta.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable ShiftToCenter
   main-is:          examples/ShiftToCenter.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99, bytestring
+  build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, bytestring, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable CleanPDB
   main-is:          examples/CleanPDB.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable SplitModels
   main-is:          examples/SplitModels.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99, bytestring
+  build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, bytestring, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable CanonicalAxes
   main-is:          examples/CanonicalAxes.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable PrintEvents
   Main-is:           tests/PrintEvents.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
 
 Executable PrintStructureObject
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  Build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   Main-is:          tests/PrintStructureObject.hs
   other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
 
 Executable Rg
   main-is:           examples/Rg.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-depends:    base>=4.0, base <4.7, ghc-prim, bytestring, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.99
+  Build-depends:    base>=4.0, base <4.7, ghc-prim, bytestring, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
   other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
 
 Executable StericClashCheck
   main-is:           examples/StericClashCheck.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-Depends:     base>=4.0, base<4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, Octree >= 0.5, QuickCheck, text, text-format, hPDB >= 0.4
+  Build-Depends:     base>=4.0, base<4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, Octree >= 0.5, QuickCheck, text, text-format, hPDB >= 0.999, iterable >=1.0
   other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
 
 -- if flag(haveOpenGL) -- why can't we make it conditionally available?
 Executable Viewer
   main-is:          examples/Viewer.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  Build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, OpenGL, GLUT, hPDB >= 0.4, bytestring
+  Build-depends:    base>=4.0, base <4.7, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, OpenGL, GLUT, hPDB >= 0.999, bytestring, iterable >=1.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
diff --git a/tests/PrintStructureObject.hs b/tests/PrintStructureObject.hs
--- a/tests/PrintStructureObject.hs
+++ b/tests/PrintStructureObject.hs
@@ -7,5 +7,5 @@
 import Data.ByteString.Char8 as BS
 
 main = do [inpfname, outfname] <- getArgs
-          Just structure <- PDBIO.parse $ BS.pack inpfname
-          PDBIO.write structure $ BS.pack outfname
+          Just structure <- PDBIO.parse inpfname
+          PDBIO.write structure outfname
