Adding array sorting and special use cases.