Implemented the ability to manage the segments localy using a randomly generated id. Seems to work but is by no means fool proof.