fix: Code review changes. Clean up deprecation warnings.

Change-Id: Icbe8e43f566134181d71b7b8af92bb618c90e5d1
Merge "fix: Code review changes. Clean up deprecation warnings."