Added more tests and did some refactorings as a consequence