Ticket/12610

Refactoring code