more code cleaning, added drawBox function to box contours