javascrip cleanup