Clean Polygon class from obsolete variables. Add method in controller to know what kind of line is the segment drawn by user.