remove unnecessary html and javascript