Removes references to old pis