Refactored hooks code to MethodExecutionMessageProcessor