Fixed tests
Refactoring
Refactoring