More bugfixes

returning JSON data is still broken, awaiting conversion of datetime
objects to ISO date strings