Scroll, state, split

New header in file, broke out scroll function, added state variable,
started to work on a general way of choosing command