Eliminate code repetition.