clean up comments, revise state space