Remove use of malloc/free for memmove