fix issue with cloning nested repeats, closes #162
updated JSDocs