Added method documentation
Removed trailing space
Removed unused import
Added controllerRound to updateState, and refactored out function unnecessary declarations
renamed functions beginning with set to save, which better describes the fact that they are used to save data to permanent storage.