Adding a way to configure a scope to factory function