Cleanup/formatting - more switching from std::function to templates where appropriate