Incorporate upstream and HA code.