[TASK] Heavy refactoring