Preparations to replace polygon checking functions with an actual class Polygon (transition not completed yet).