Added a memcpy function for my common.h. It works, but it could be improved