Added some functionality to buttons