Multiple changes

Changes to the way the buttons react to the application state. Also
changes to the way the table reacts to the state and new states.