Added DEBUG switch.