Style fixes, remove undefined function, future proof use of std::