added a delegate, added initWithCoder (to work with storyboard), changed currentIndex logic

added a delegate
changed current index logic
added initWithCoder (to work with storyboard)