Clean up and fix errors with NPCs