Converted debug comments to use qDebug(). Cleanup.