Smaller fixes

Fixes #6, #9, #10, #11, #12