clean up  javascript