1st batch of code clean-up and doc changes