merging in new routes and views for api json endpoints that Graham worked on.