Removed extensive use of std::promise