Fixed compilation with GHC 7.6.3.
Added -Wall and -Werror.
Cosmetic changes.
Hlint suggestions.