Various speed improvements

Most of these are due to removing unnecessary method calls for
properties.
More int array conversions
More array wrappers
More performance tweaks