Trait classes updated with toString function and minor fixes.
Minor changes in Agent files.
Minor changes in AgentHandler.