Event system based on std::function.
Clean up.