Initial refactoring of hook classes.