Added event binding and repeat directives