Further cleaned up code. Note to self: cabal install before testing in ghci. Save an hour of frustration :)