Refactoring first stages