Working version with local json files.
Also cleaned version.