Added algo debugging functions
Working on refactoring to use column indices