HLint-ed, made to compile with ghc 7.6.3