Pass in configuration to make code more testable