DTW working, tests added. Needs refactoring