First draft of indexer and ranker.