Improve scala snippets.