misc cleanup
Merge branch 'random' into issue189
more cleanup
more cleanup
#189
close#191
#189
merge conflicts