Make polygon into full class and use foreach elsewhere as needed.