Removed lots of redundant functions. Updated the phase plot to allow many samples.