routing and database

I have begun creating the routing class, plus I have updated the
database and the database class.