Refactoring

Background refactoring