More tests & refactorings