Restored old Utilities.php with some improments