Simple refactor

Changed names of i and j to proper row and column.