Refactor how positions are updated.