moved events into directives, created showOptions directive, removeItem directive, and changePage directive