Changes from Jeppe
Refactor clip code
Move duration2sec function
Refactor search