Added some tests for currIndex functionality
Move the onClose callback to before the _index reset, so you can determine the last step at close time