Remove duplicate snippets by taking better advantage of regex.

Also remove duplicate testing files with varying extensions.