Extract altR_replDll*(); refactor