updates to support snippets. Resolved #21