many changes, improved C++11 support