Adding tests and fixing a bug with cloning

- Closes #2040
- Add basic testing
Merge pull request #2041 from simianhacker/vis-quick-fix

Adding tests and fixing a bug with cloning