Some array logic cleanup.