Rewrote definitions