Eliminate code duplication.