Merged the event functionality method into one.
Added a method to return the input element.