Improving logic related to quotes