Refactor to Reader. Not sure this is better
Fix hlint suggestions
Fix ghc warnings