code cleanup to remove warnings