refactor some of the peripheral stuff into control.ls
replace use of localStorage with sessionStorage