Removed more global variables

Created sub calendar to deal with dates