Adding last changes to Agent.cpp before next session of work.