Added better cage boundary estimation
Added class for handeling rectangles