Added "getNextID()" method and changed the way npc's are saved.