more fix-ups for problems that the tests seem to have missed entirely
bump the version number, fix several bugs that trying to use this code in a different project have turned up and some other bits