New functions to compute the percentile a user is in (migration). Controller functions updated to use them.