renamed memset/memcpy, some fixes