added part of google calendar sync code and some other changes