Added do and when
Various bug fixes with def, when, do
Added type examples.  Fixed deftype macro.