update for new json format
cleanup
added options for last subpath, e.g. for custom file icons.