Switched over to C++11 and made changes where they made sense.