Calendar: code cleanup