Updated scala snippets