more tests, extra fixes
merged master