PAHMA-964: Some code cleanup.