Use alias for long method chain (this.agent.intermediatesStore,this.agent.datasetStore)
Restructure codes for checking completion