Removes extraneous javascript code