minor calendar refactorings and improvements