Rewriting to make much simpler.