Updated with preview functionality for snippets.