removed dead code & some debug cruft