refactoring to break a thick func down into smaller ones.
Added a hacky specification of the environment. If there is a command line argument provided, then it assumes its not the test enviroment.
Built a new database abstaction.

I realized I'd never track down the problem without abstracting out the
database object from the tables. I did that, and implemented
environment fetching, and adjusted the tests to reflect those changes.
Additionally, added a lot of verbosity to the logging to make sure that
changes made to the db were persisting -- this should be toggle-able.
Merge pull request #1 from bravenewprince/env_vars

Env vars + up and running