json-response: Clean up database.hs.