Port functions in flate to delfate.  Remove flate.
Refactor code, clean up comments.