Renamed 'state' object

To be consistent across all files.