Change Output to be a generic std::function.