Moved inner class definition outside outer class scope in order to
fix Clang build.