Refactoring quotes.py, added error handling skeleton (unfinished)