Code review

Let me know when you are free and I can talk you through my changes.

* Please remind me to talk about statefulness.