Some code cleenup. More to come