Refactor Deploy.expired as per review by pchen@