Add ability to write state to file
Add README
Merge remote-tracking branch 'upstream/master'