Added a little system documentation and fixed a state order bug.

Re-read my state order and realized it was messed up. A few more todos
and this is ready to run (in testing, of course).