Implemented global identifiers for instances. fixes #115