Fixed memory leaks.
Stupid compiler.
Fixed the pound define that had been incorrectly optimized by the compiler.