Dependency injection

Trying to get dependency injection working, not quite happening yet.