Let XASSERT call exit with XEXIT_CODE when condition fails.
Added XCHECK macro to test condition without calling exit.
Fixed compiler errors.
Formatted sources.
Fixed memory leak.