Refactor update_quote