Pull request for various fixes 'n' such

Yay especially the first commit, which totally makes sense