Refactor quote