Made some renaming and comment changes to stay consistent with the notions used in Musolesi's paper