Attempting to rewrite MultiAgent.pm based on new Perl knowledge.
The test script has been modified accordingly.