Split the code into classes.