Added stuff for multiple calendars, this needs a refactoring, will work in future