Take account of new variables; change debugging output