using std::unique_ptr in Table, fixed memory leaks and madness