Refactoring this into proper classes.