clean codes about json and fix move function in EventsController