fixed rank function syntax
corrected string variable assignments in rank conditionals
Better wording, other improvements