Fix doc spelling, warnings about switch and member hiding

Fix small warnings about not all possibilities in a switch and an argument name hiding member variable.
Fix spelling in doc.