Move to C++11 std::function style callbacks