More work towards removing main