Fixed up so can run from command-line as per the README.