diff --git a/Changelog.markdown b/Changelog.markdown
--- a/Changelog.markdown
+++ b/Changelog.markdown
@@ -1,5 +1,9 @@
 # Changelog
 
+## 0.1.2.0
+* Moved Util module
+* Improved documentation
+
 ## 0.1.1.0
 * Support for schema validations.
 * Improved Haskell API
diff --git a/postgresql-simple-migration.cabal b/postgresql-simple-migration.cabal
--- a/postgresql-simple-migration.cabal
+++ b/postgresql-simple-migration.cabal
@@ -1,5 +1,5 @@
 name:                       postgresql-simple-migration
-version:                    0.1.1.0
+version:                    0.1.2.0
 synopsis:                   PostgreSQL Schema Migrations
 homepage:                   https://github.com/ameingast/postgresql-simple-migration
 Bug-reports:                https://github.com/ameingast/postgresql-simple-migration/issues
@@ -19,7 +19,6 @@
 
                             src/*.hs
                             src/Database/PostgreSQL/Simple/*.hs
-                            src/Database/PostgreSQL/Simple/Internal/*.hs
 
                             test/*.hs
                             test/Database/PostgreSQL/Simple/*.hs
@@ -33,7 +32,7 @@
 
 Library
     exposed-modules:        Database.PostgreSQL.Simple.Migration
-                            Database.PostgreSQL.Simple.Internal.Util
+                            Database.PostgreSQL.Simple.Util
     hs-source-dirs:         src
     ghc-options:            -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
     default-extensions:     OverloadedStrings
diff --git a/src/Database/PostgreSQL/Simple/Internal/Util.hs b/src/Database/PostgreSQL/Simple/Internal/Util.hs
deleted file mode 100644
--- a/src/Database/PostgreSQL/Simple/Internal/Util.hs
+++ /dev/null
@@ -1,24 +0,0 @@
--- |
--- Module      : Database.PostgreSQL.Simple.Migration
--- Copyright   : (c) 2014 Andreas Meingast <ameingast@gmail.com>
---
--- License     : BSD-style
--- Maintainer  : ameingast@gmail.com
--- Stability   : experimental
--- Portability : GHC
---
--- Migration library for postgresql-simple.
-
-module Database.PostgreSQL.Simple.Internal.Util
-    ( existsTable
-    ) where
-
-import           Control.Monad              (liftM)
-import           Database.PostgreSQL.Simple (Connection, Only (..), query)
-
--- | Checks if the table named 'table' exists in the provided database.
-existsTable :: Connection -> String -> IO Bool
-existsTable con table =
-    liftM (not . null) (query con q (Only table) :: IO [[Int]])
-    where
-        q = "select count(relname) from pg_class where relname = ?"
diff --git a/src/Database/PostgreSQL/Simple/Migration.hs b/src/Database/PostgreSQL/Simple/Migration.hs
--- a/src/Database/PostgreSQL/Simple/Migration.hs
+++ b/src/Database/PostgreSQL/Simple/Migration.hs
@@ -7,7 +7,9 @@
 -- Stability   : experimental
 -- Portability : GHC
 --
--- Migration library for postgresql-simple.
+-- A migration library for postgresql-simple.
+--
+-- For usage, see Readme.markdown.
 
 module Database.PostgreSQL.Simple.Migration
     (
@@ -28,27 +30,31 @@
     , SchemaMigration(..)
     ) where
 
-import           Control.Applicative                      ((<$>), (<*>))
-import           Control.Monad                            (liftM, void, when)
-import qualified Crypto.Hash.MD5                          as MD5 (hash)
-import qualified Data.ByteString                          as BS (ByteString,
-                                                                 readFile)
-import qualified Data.ByteString.Base64                   as B64 (encode)
-import           Data.List                                (isPrefixOf, sort)
-import           Data.Monoid                              (mconcat)
-import           Data.Time                                (LocalTime)
-import           Database.PostgreSQL.Simple               (Connection,
-                                                           Only (..), execute,
-                                                           execute_, query,
-                                                           query_)
-import           Database.PostgreSQL.Simple.FromRow       (FromRow (..), field)
-import           Database.PostgreSQL.Simple.Internal.Util (existsTable)
-import           Database.PostgreSQL.Simple.ToField       (ToField (..))
-import           Database.PostgreSQL.Simple.ToRow         (ToRow (..))
-import           Database.PostgreSQL.Simple.Types         (Query (..))
-import           System.Directory                         (getDirectoryContents)
+import           Control.Applicative                ((<$>), (<*>))
+import           Control.Monad                      (liftM, void, when)
+import qualified Crypto.Hash.MD5                    as MD5 (hash)
+import qualified Data.ByteString                    as BS (ByteString, readFile)
+import qualified Data.ByteString.Base64             as B64 (encode)
+import           Data.List                          (isPrefixOf, sort)
+import           Data.Monoid                        (mconcat)
+import           Data.Time                          (LocalTime)
+import           Database.PostgreSQL.Simple         (Connection, Only (..),
+                                                     execute, execute_, query,
+                                                     query_)
+import           Database.PostgreSQL.Simple.FromRow (FromRow (..), field)
+import           Database.PostgreSQL.Simple.ToField (ToField (..))
+import           Database.PostgreSQL.Simple.ToRow   (ToRow (..))
+import           Database.PostgreSQL.Simple.Types   (Query (..))
+import           Database.PostgreSQL.Simple.Util    (existsTable)
+import           System.Directory                   (getDirectoryContents)
 
 -- | Executes migrations inside the provided 'MigrationContext'.
+-- 
+-- Returns 'MigrationSuccess' if the provided 'MigrationCommand' executes
+-- without error. If an error occurs, execution is stopped and
+-- a 'MigrationError' is returned.
+--
+-- It is recommended to wrap 'runMigration' inside a database transaction.
 runMigration :: MigrationContext -> IO (MigrationResult String)
 runMigration (MigrationContext cmd verbose con) = case cmd of
     MigrationInitialization ->
@@ -101,7 +107,7 @@
             when verbose $ putStrLn $ "Fail:\t" ++ name
             return (MigrationError name)
     where
-        q = "insert into schema_migrations(filename, checksum) values(?, ?) "
+        q = "insert into schema_migrations(filename, checksum) values(?, ?)"
 
 -- | Initializes the database schema with a helper table containing
 -- meta-information about executed migrations.
@@ -208,6 +214,7 @@
     | MigrationScript ScriptName BS.ByteString
     -- ^ Executes a migration based on the provided bytestring.
     | MigrationValidation MigrationCommand
+    -- ^ Validates the provided MigrationCommand.
     deriving (Show, Eq, Read, Ord)
 
 -- | A sum-type denoting the result of a single migration.
@@ -245,7 +252,7 @@
 getMigrations = flip query_ q
     where q = mconcat
             [ "select filename, checksum, executed_at "
-            , "from schema_migrations"
+            , "from schema_migrations order by executed_at asc"
             ]
 
 -- | A product type representing a single, executed 'SchemaMigration'.
diff --git a/src/Database/PostgreSQL/Simple/Util.hs b/src/Database/PostgreSQL/Simple/Util.hs
new file mode 100644
--- /dev/null
+++ b/src/Database/PostgreSQL/Simple/Util.hs
@@ -0,0 +1,24 @@
+-- |
+-- Module      : Database.PostgreSQL.Simple.Util
+-- Copyright   : (c) 2014 Andreas Meingast <ameingast@gmail.com>
+--
+-- License     : BSD-style
+-- Maintainer  : ameingast@gmail.com
+-- Stability   : experimental
+-- Portability : GHC
+--
+-- A collection of utilites for database migrations.
+
+module Database.PostgreSQL.Simple.Util
+    ( existsTable
+    ) where
+
+import           Control.Monad              (liftM)
+import           Database.PostgreSQL.Simple (Connection, Only (..), query)
+
+-- | Checks if the table with the given name exists in the database.
+existsTable :: Connection -> String -> IO Bool
+existsTable con table =
+    liftM (not . null) (query con q (Only table) :: IO [[Int]])
+    where
+        q = "select count(relname) from pg_class where relname = ?"
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1,3 +1,14 @@
+-- |
+-- Module      : Main
+-- Copyright   : (c) 2014 Andreas Meingast <ameingast@gmail.com>
+--
+-- License     : BSD-style
+-- Maintainer  : ameingast@gmail.com
+-- Stability   : experimental
+-- Portability : GHC
+--
+-- A standalone program for the postgresql-simple-migration library.
+
 module Main (
     main
     ) where
@@ -60,6 +71,9 @@
     putStrLn "                  ignored. If a script was changed since the"
     putStrLn "                  time of its last execution, an error is"
     putStrLn "                  raised."
+    putStrLn "      validate <con> <directory>"
+    putStrLn "                  Validate all SQL scripts in the provided"
+    putStrLn "                  directory."
     putStrLn "      The <con> parameter is based on libpq connection string"
     putStrLn "      syntax. Detailled information is available here:"
     putStrLn "      <http://www.postgresql.org/docs/9.3/static/libpq-connect.html>"
diff --git a/test/Database/PostgreSQL/Simple/MigrationTest.hs b/test/Database/PostgreSQL/Simple/MigrationTest.hs
--- a/test/Database/PostgreSQL/Simple/MigrationTest.hs
+++ b/test/Database/PostgreSQL/Simple/MigrationTest.hs
@@ -1,16 +1,26 @@
-{-# LANGUAGE ScopedTypeVariables #-}
+-- |
+-- Module      : Database.PostgreSQL.Simple.MigrationTest
+-- Copyright   : (c) 2014 Andreas Meingast <ameingast@gmail.com>
+--
+-- License     : BSD-style
+-- Maintainer  : ameingast@gmail.com
+-- Stability   : experimental
+-- Portability : GHC
+--
+-- A collection of postgresql-simple-migration specifications.
 
 module Database.PostgreSQL.Simple.MigrationTest where
 
-import           Database.PostgreSQL.Simple               (Connection)
-import           Database.PostgreSQL.Simple.Internal.Util (existsTable)
-import           Database.PostgreSQL.Simple.Migration     (MigrationCommand (..), MigrationContext (..),
-                                                           MigrationResult (..),
-                                                           SchemaMigration (..),
-                                                           getMigrations,
-                                                           runMigration)
-import           Test.Hspec                               (Spec, describe, it,
-                                                           shouldBe)
+import           Database.PostgreSQL.Simple           (Connection)
+import           Database.PostgreSQL.Simple.Migration (MigrationCommand (..),
+                                                       MigrationContext (..),
+                                                       MigrationResult (..),
+                                                       SchemaMigration (..),
+                                                       getMigrations,
+                                                       runMigration)
+import           Database.PostgreSQL.Simple.Util      (existsTable)
+import           Test.Hspec                           (Spec, describe, it,
+                                                       shouldBe)
 
 migrationSpec:: Connection -> Spec
 migrationSpec con = describe "Migrations" $ do
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -1,3 +1,14 @@
+-- |
+-- Module      : Main
+-- Copyright   : (c) 2014 Andreas Meingast <ameingast@gmail.com>
+--
+-- License     : BSD-style
+-- Maintainer  : ameingast@gmail.com
+-- Stability   : experimental
+-- Portability : GHC
+--
+-- The test entry-point for postgresql-simple-migration.
+
 module Main
     ( main
     ) where
