Changed for loops to Memmove calls.