Refactored polygonal functions.