Added more tests and fixes
Some more changes and doc