Move repetitive code to helpers