Refactor metabox generation for new posts/pages