javascript clean up