Changed to C++ std-ish style