Pattern engine almost done