Fix string template usage and add direct assignment operator on ref_ptr