Added more tests
Implemented integration tests