fix repo URL in .cabal file
remove unused imports and functions
add "ghc-options: -Wall" to .cabal
factorize code and remove commented functions
don't use partial function "head"
Merge pull request #5 from Changaco/master

Clean up code