Added dependency injection into views