Refactored MVC and DB code due to import errors.

Moved model code up to main directory in one file. Same with cvontroller
code. Moved database.py to the main level and changed it to an object.
dantest.py is a temporary file for those working on this branch, not
intended for master repo.