Fixed bottom-up mergesort logic; added top-down mergesort