Rewrote lots of stuff.