Passes function as const reference

Updates ActionTest as well.