tweaks and bugfixes
remove cruft
style
more decrufting