Write button listeners and view updates