factor out mod_shared_snippets