Rewrote almost everything.