Refactor to simplify

PWD before api.key and json.sh