Actually initialise the unique_ptrs with live objects

... instead of nullptr.
Close the tox object after use.