Refactor / prepare to support dedicated pattern APIs

Refs #2