Further cleanup. There wasn't any reason to have a constructor for that JavaScript code.