+ added template to output collection
+ added checking in Database.paginate to check for
  and set error, links (before appending pagination) queries and template.
+ Started collection+json frontend middleware