Added more tests and docs