allow clone of layers

Fixes #5