Word Matching Logic

First pass at word matching logic.
Added tests around word matching.

Some restructuring of directory layout.