Improved identity implementation