Change the semantics of the Rank constructor from an int

This is to make creation of ranks from chars less painful, also
added tests.