Use memcpy to avoid a silly warning
Add a few missing returns