Refactor / prepare to support dedicated pattern APIs