Fixed some variable names: r/m -> r, r/m -> m