Minor fixes; moved some code here from other calendar files.