remove unused trash from js snippets