fix #683 refactor load from file/gist/example to be consistent

Refactored so that loading from any JSON blob (file, gist, example) runs through the same code path. Now if we have a bug with one of them, at least it will be a bug with all of them.