added a delegate

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