Minor and major fixes.
Uncommetn debug variable.