Code refactoring
Created Polygon class.