code review: code clarity improved (unused variables removed, ...)