Identity model refactured