Moved previous output code into endpoint
Changed order of stuff in pipeline view to avoid validation errors when
COSM triggers were'nt being created