Work on the refactoring