Code - Added most of the ranking code. Need to add the duplication checking code and test