Add exit code and some slight changes.