Facility for lactating animals includes pens in a freestall barn and a milking parlor where animals from the pens are simultaneously milked while separated. The number of animals from different pens in milking stalls is changed by sliding a parlor barrier past entrances and exits of parlor stalls. Each pen includes bedding free stalls, an alley accessible by the animals as they enter and leave the free stalls, and a movable barrier traversing the accessible alley. The pen barrier assures that animals go to the milking parlor. Paths cause animals in a first pen, prior to milking, to return to the first pen after milking while preventing animals in other pens, prior to milking, from entering the first pen after milking. There are separate return alleys to each pen from separate parlor exits. The pen barrier prevents animals from occupying stalls it passes and refurbishes these stalls.