Utility function cleanup