Set uid during object create

Still need to add some unit tests.

ACK.