Rearranged is sorted

Split is sorted into seperate files and renamed the vector to vec from
x inside each function.