Various changes. Improved shell snippets.