Initial pat4primary commit
Merge https://github.com/rigneysj/pat4primary