Identity models refactored (extracted to libraries)