Refactor quantile
Add new tests, hit 100% test coverage