More class stuff, some c code for dtw