Cleaned up the polar plot code