sarted chapter6 cleanup
chapter 7 & 8 RE stuff
More cleanup