Referral code changes actually.
Docs adjustments
Re-implemented apply referral code
Update version to 1.1.6
Merge branch 'master' into stackoverflow
Added back Alex's fix for rare condition