Rework ActivitiOperation to use an operation tree and inherited classes