More documentation fixes and unused variable removal