Change compute_mass handling by using ComputeMass class