Variable reduction and debug improvements