fix comment typo
remove duplicate count array element setting code
simplify @Error setting when no controls found
slightly simplify array resizing