Creation of unique codes based on number.

I've responded to your original post to carry on the conversation there - that will create a more cohesive set of questions for people who come to look at this in the future.