Now using std::queue and std::sharded_ptr for better usability