Added percentile and improved EQC code.