Change from fetching current threshold state to fetching past threshold state (on a delay); clean up Agent class