Submitting a pull request for Ian's code.

Looks like he's trying to put the countries inside the user (instead of the users inside the countries like we've been doing) but after that minor fix it should be good to go.