Fixed some memory leaks. Some with unique_ptr .. one with a destructor