Move duration creation to its own module