Refactor id's