Tweaked function copying
Testing function copying
Trying a different approach for function crashes