Corrected bounding boxes and added graphical debugging