Updated to compile using g++ instead of gcc
Had to change some declarations and deprecated features