added support for system exit
remove &nbsp; for normal whitespace