Add state saving methods and correct requirements.txt