cleanup to improve code clarity.