Rewrote pretty much everything.