[TB] [78726180] refactoring, tests, documentation, comments