Clean up JavaScript code.