Code improvements / clean up

Code improvements / clean up.

No real code changes.