fixed versionsSelf, improved copy following count, added tests for copying and copy versions, optimizations, fixed overly-cautious let globalization
optimizations