fix #20 + some misc cleanup
misc comments