I don't understand when looking at this what is going to happen.

I would like to see all the state passed to an instance of something that can do the work and hide the details.