Refactored resource invoker