removed old db access
replaced with mongoid
made documents use a single collection/type
allow hierarchical nesting of docs
simplified authorisation code
still need to add media handling code in (only acceting json for now)