Using Func<string> as a dependency. Closes GH-244