CLEANUP: Dropped unused 'nCols' variable
CLEANUP: Dropped unused 'numParams' variable
ROBUSTNESS: Replaced '&' with '&&'. Add explicit parethesis