Clean up JavaScript