end() function now takes in a parameter 'notCompleted'. The tour state is set to ended only if notCompleted is not defined or is false. This allows end() to be called programmatically without ending the tour (e.g. the tour can be cleaned up if the user navigates away from the page, and would be resumed when they return).