Some cleanup to action hooks