Keep these changes I don't remember making

Next commit is nuking the repo so I might as well commit these incase
I ever need to come back to them.
Rewritten in Haskell