Wrote a JS wrapper for better type testing and dodging the file save/load issue