#207 and revert mistakenly deleted code in zp_copyCanvas

And a little more cleanup
Merge branch 'issue_207' into 1.4.5