Externalize macros fixed for GCC.
Leaks fixed.