Split out code into smaller classes