Moved javascript snippets into the main snippet file