Added exception to setId method
updated identity
Moved logic of IpAndPidIdentity into Identityclass