Added FunctionControllerResolver and tests