Fixes for #2

A series of minor fixes for #2.
Merge branch 'cleanups' into dev