bitwise row/col usage checks.

Don't use so many arrays.
Remove some useless iteration.