Changed length to duration. Fixes #23