Began debugging.  Removed some small errors. Problem now is that genFitMatrix is not creating the correct size matrix.  Need to look at this more.