Use more typed arrays and fix tests.
Add more typed arrays and fix tests.