Changed all strcpy's to strncpy, and all strcat's to strncat