A few minor fixes

Tiny best practice improvements I noticed while browsing the code :)

Really great work though, nice and tidy code, thumbs up.