optimized merges sort, less copy
implemented heap sort
refactored tests