cleaned up WebAPI class a bit and added getDB()