Moved class SortedArray to it's own file