Added button click listening and framework for updating the view