[TASK] Refactoring and unit test coverage increase