Moved structure stuff all to internal except for OutputType