Start work on linearize transform.
I have no idea what I'm doing. It seems to work now, at least.