User defined table types & scope identity.

Improved support for user defined table types.
Added support for scope identity.