Minor cleanup and some small changes to fix calender