Applied changes to the refactoring