Remove Array.revert usage