Updated the tests and changed only small internal parts of method of the agenda model. No API changes