clean up, loading of external .json

Gallery now accepts either passed in json-object or filepath which now
gets loaded via xmlhttprequest