Added functionality to buttons for basic workflow.