Dependency injection and calendar settings refactoring