Working on the js nightmare