cleanup html script api