latest re-factor and added many comments and links to fullcalendar docs