Removed some redundancies and used UniquieID instead of manually converting the byte array.