Add referral and fixed many small details