Full refactoring in progress