Minor improvements to pattern architecture.