LPS-46984 reorganize logic and move classes