More work on new rank function.
More work on new rank function.

pombredanne/paperpile,jondo/paperpile,pombredanne/paperpile,jondo/paperpile,pombredanne/paperpile,jondo/paperpile,jondo/paperpile,pombredanne/paperpile,pombredanne/paperpile,jondo/paperpile