I have no idea why I missed this request till now. I apologize.
I use a custom mod for shortening the registration. I have not documented the code but there is an existing mod that does this.
I think Niels wrote it. I can send it to you if you can't find it.
The referral mod is John Abela's and as with any of his mods they are only found on phpbb.com
Here's the random avatar script