Clang detection.
Fix bugs and add stubs for mode processing.