minor bug fixes, new unit tests

also minor improvements to user feedback