Fixed missing define.
Enable undefined define warnings.
Cleanup.