Initial attempt at dependency injection