Changed to unique_ptr and strict ownership