Refactoring with some naming conventions