Revert unsafe performance tweaks.
Simplify pending data flushing.
Slightly cleaned up code.
Merge branch 'safety'
Update README.