add and reorganize snippets
javascript snippet updates