some more small tweaks
add test for issue #16
fix issue #74