More documentation

I finished documenting the state manager class.