chore(identify) move private func to bottom of file
refactor(identify) extract proto encoding