FIX: Fixing and further refactoring of Classes/Hooks/CMSLayoutHook.php