cleaned up code and commented agent.dart