Added more tests, updated documentation