Fixed tests after refactoring