Major refactorings in quote