Improve db

#8 @gsathya @ben-jones 
I changed directory structure and split server.py into models and views.
why are you setting the config again? this was done in __init__.py right?