refactor script to work from cwd, change config file to be json