Encapsulate SQL class.
Added qr_processing_error example.
Cleanup.