lib: better memcopy/memmove

Signed-off-by: garwedgess <garethwilliams21@gmail.com>