some js clean up