Added some Javascript snippets