migrated more simile ajax functions to jquery plugin and made modifications in timegrid and util