fix spelling error in docs
add explanatory comment
remove dead code