Clang C++11 support fixed.
Minor refactoring.