improved some parts and changed things to unique

Figured out Id that where not primary key still had to be unique