Refactor Identify class

Change: minor refactoring and formatting improvements.