Calendar controller refactoring