Some functionality moved into separate classes.