Working through errors in dependency injection feature