Add parameter for providing a dependency class

This is a more flexible take at the problem mentioned in issue #7.