removes toc scripts etc