Implemented QuantileStats, cleanup and refactoring (frequency plot)