Incorporate feedback, tidy code for snippets