moved passmanager into context for thread safety and use in OfflineModule