refactored quotes.js