Convert tabs to spaces, and add `updateCost`