Added debug mode to toggle UI controls