Refactor figure patterns