Adding c++11 support. Replaced all enum with enum class