Depends how much code we need to add to support all three.

I think a first step would be to split things up into smaller methods. If we get too many of them, we can start extracting classes.