global refactoring. Separation of entities