added init script and javascript snippets