clean up javascript from old add works flow