clean up unneeded JS code