Move code running into it's own classes.