Add optimisation to remove unused variables
Fix copyto signature
Remove alone pure expression