Refactor setInstance / addInstance
Add equalsAndOverrides