Code cleanup, Some more R resolver fixes