several cleanups wrt identifier handling