Pull request for various fixes

Yay for fixing things!