Added state saving and updated Json files.