Fixed clang support

Clang has very bad support for local classes, so just use normal classes
instead. Now gcc and clang are both fully supported.