Replaced custom string copy with memcpy