Calendar refactoring