Code style improvements and fixing #37: CalendarBase