Implemented QUOTE.
Fixed a few bugs.