Clean up JavaScript
mod