Mostly patching up imports (introduces an importer for use in possible PyQt5 support), but a few fixes for QUrl issues and other miscellanea