Move code to RProvider.dll