refactored exports, fixed tests, and added test for legacy exports to loadJSON; fixes #118 #140
fix splicing while iterating through array #118