Added Ids
Fixed some dumb bugs in the ids