Adding exit codes and fix a few comments