CMS-2958 Move tecnical code that disturbs the reading of what really matters into helper-methods part 1