Refined the DAL and got a good routing pattern.

Still need to do something about the db driver