orginization of js. updated query for npc.php and added 'data' attr used for sorting. saveNPC.php updated to return active npcs. other small updates