Finished restructuring and swapped shared_ptr for unique for performance gains