WICKET-5724 Refactoring of the current solution.