Merge request for my branch (Yosh fuckups)

I believe I found a bug Daniel (relating to issue #5) , and also did some tidying (I'm super bored).