Cleanup of JavaScript