[checkmk-commits] Moved global code into main function