added a unit test for PolarData class and cleaned up said class