[UPDATE] clean up figure code.