[checkmk-commits] Moved code to helper functions