Rebase import

Allows export of sections from directives.  This also includes bug fixes to import related to metadata validation (checks for correctly named headers and valid codes).