Tweaks to snippet code