added getter, updated slideend function to work and removed comma

Updated the slideend function as it didn't fire with the existing logic.
added getSelectedIndex getter to return the index of the slide that is active.
removed comma at the end of the setter section