various minor fixes
Merge pull request #374 from magfest/misc_cleanup

I've commented on all of the changes, and I'm happy to answer any questions, as always.