Fixed up some minor stuff. exit code and statics