Some refactors I noticed when reading through the code

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