refactor interfaces to json files