Fixed tests and added more tests