Extracted three methods in order to improve readability.

We talked about this.