Add click listeners for buttons and REST calls.