Custom post type snippet refactored, beautified and added more detailed control