Improving custom post type class