Added polygon_test, fixed polygon bug

Added first to test if the polygon linked list worked.  Fixed some bugs
w.r.t to this and now are OK.