Rewrote some stuff.