removes the unrequired javascript