Some cleanup and adding PSPDFUIKitMainThreadGuard