[TASK] Refactor code to match new structure