Seperated some logic into a service

Seperated the ID generator into the editor service