minor fixes and cleanup #148