Partial pick: We won't always have a resource path

Pick notes: This is picking the rest of the commit that we didn't have.
Cleanup: removed dead code