Unified threrading between versions, added on-the-fly loading, various small fixes