users with same amount of badges share rank, some janitorial work

This should fix #24, additionally it fixes a few SA unicode warnings in the unit tests and appeases pep8.