Added more tests, updated docs