Removed the complex breadth-first algorithm and replaced with simple algorithm to find the longest horizontal and vertical lines. This assumes that the two longest lines are within the same object.