remove pica and unneeded script tags in preview