Code clean-up after move to using log(w) instead of w