fixed the memcpy declaration; alloc-msg, free-msg, and term now available