[Refactor] add actionlistener to  buttons to meet the MVC requirements