Moved some potentially hi-load operations from ArrayList to raw arrays.