Added a draw-n-gon feature, cleaned up some code.