Some refactors I noticed when reading through the code

Pretty nicely written, I didnt actually test these. But I think they are sane. Nice project, im going to use it later.