Added middleware and API doc headings
Fixup JSDocs; note: updateOrCreate function alias pulled out on separate line for docs