Updated code to comply with C++11/14