WIP: move PatternCore out; introduce Size tuple