Created more testable object factories for old code and implemented the PatternRow object and test cases.