Memory cleanup and NPC spawn fix

De-allocated dynamic memory.
Fixed NPC spawning so that it's done all at once instead of reading
through the entire file until it reads one NPC, only to do it again for
every other NPC. Basically, it changes from O((N^2+N)/2) to O(N), where
N is the number of NPCs being spawned.