Move agenda code together to agenda.scala

No functional changes.