Fixed tests and added more tests as tests