Refactoring
Adapted tests