cmd_whowas Major cleanup, fix inefficiencies