Refactored constructor code and serializing. Also added npc code skeleton.