Added needed safecopy declars, fixed errors

Now functional, but does absolutely nothing