Refactor so app knows dependencies

This way no one outside the app knows of the dependencies.
Also reduces duplication in config.ru and test_helper.rb