began restructuring from routes to flask classes and reorganized the db classes