Switch to C++11 enum classes, add more tests