cleaning up the js