Replaced all strcpy with memcpy