Much better way of handling creating polys or lines (fixed bug where they were indistinguishable in saved cookie data)