Check function for collisions.
Make ids 30-bit long.
Some documentation tweaks.