Fix bug where phi was not being updated
Fix computation of background update

Previously I was collapsing arrays along the wrong axis