Revert "Revert "Cleaned up NPC code""

This reverts commit a55d23cdd3db61fd6ad67d8ea2327c4d363818c1.