Added even sort. Changed memcpy to memmove.