Uses vars to keep things DRY.