Complete first version of state monad
Separater rendering from commandization