database: Clean up database.hs and JsonParser.hs.