Completed MMQL-DAgger script