updated Makefile in root folder
got rid of unnecessary memcopy's without making the code unreadable