More cleanup, started adding code for button inputs and SSR control.