lose dead code and tidy up
test and coverge improvements
more coverage
lose dead code