Simplify valid Identifier detection

Also remote old debug code.