I'm playing on iOS and I just can't figure this out, there are so many questions...

-When I finish a Challenge I get a leaderboard rank number, is this number unique to just the table, or is there a different rank by: Table x challenge type x difficulty x day?

-Is the number shown for the specific game I just finished, or is it the one for my highest rank ever achieved?

-What is the rank based on, just score? If it's not based on difficulty, I take it that the more difficult matches would yield a higher rank (since a higher score is possible)? How can I get a higher rank?