Refactor quote variable into flags array.