Isolates the tool construction code and also makes the assignment within main more straightforward. While we're at it, we can also make use of std::make_unique within the relocated function.