create id object from String.

Could you please review my understanding and show me right direction? It's just prototype that contains a lot of assumptions and I am not able to understand how to make it better. At least, for now, because I am sleepy :)