Some bug fixes. Added a function timeToExtinction