Refactor identity