Added parameter validation for matrix
Added index for add-column and add-row