Cleanup ID management