Add a mix-in class to reduce code duplication.