Notes on reducing code duplication.