Further cleanup to reduce PHP notice warnings