Added guard (for auto-test-execution goodness)
pulled out configuration stuff into its own class, added tests