Added get_duration. Closes #118