added Guice for injection, refactored to move credentials to be injected, refactored tests