Tests dont work yet after refactoring