Initial parts of mergesort implementation