Moved to c++11 standard, added thread support for all platforms