There's a very wide range of ways this code could be divided up. Here's one option as UML:
One answer