NRT - change xmalloc's to malloc just to be safe