Changed abs (returns int only) to std::abs