Cleaned up TestCorpus class.
Added Tests for Pattern class. Some reorganization.