More code cleanup. This time the states got cleaned up.
A few changes to fix a stupid design idea I had.
Still fixing it. That should be about it.