Fix copying objects by using JSON native methods. Closes #36
Merge branch 'master' into gh-pages