Refactored resource invoker and model request mapper a bit