Clearer variable names, and workaround for possible API bug

- copyLayer instead of thisLayer
- copyDecomposedLayer() changed to copy().copyDecomposedLayer()