Improved RESTful api

Now supports nested database objects and the ability to be extended by
third party developers.