Separate the portfolio.php into three separate files, each for examples of post types, taxonomies, and meta.  Add the base code for handling each.