Modified some stuff to conform with c++0x.