Cleaning up JavaScript.