Cut down repetitive code