Adding view layer and dependency injection