fix regression itroduced in prior commit
restore use of ArraySize convenience function
remove unused variables
Merge branch 'prerelease' into ditto