Started work on tracking rotations and reflections in PatternExtractor.