Add is_singular check and class