1. Fixed a bug in choosing matrix sizes and unroll factors when there is
no blocking (numLevels = 0).
2. Changed search to search for all levels upto the maximum specified,
and take the best.
3. Some more code cleanup