Small refactor to keep rank values as numbers.