CODE: Refactor NPC.