Introduction to Pattern Matching (clean up)

Removed duplicated code and utilized the Trie class from the Data
Structures script.  Also, simplified a multiline for statement into a
one line list comprehension.  Closes #3.