Added class_exists to hook manager