Added more tests and functionality