refactor clear boxes, columns, and rows into one file