restructure objectives and js events