Refactored resource path lookup