New version of memory functions.
Changed a few haloobject functions to use crefs.
Added push/pop support for wide strings.