Rewrote some minor things