Fix ghc warnings and hlint suggestions