Refactor for set matrix zeroes