Make code more testable