[RDY] Transform global variable really_exiting into static.

Transform global variable really_exiting into static and some minor style changes.

Comments are welcome.