Some small fixes

Mostly harmless stuff here. I may commit the changes for issue #57 here if I finish it soon.