Adding ID allocation implementation.