Revert "Code cleanups"

This reverts commit b93fbcbbe179f201cd4be10f2ad7ef86e86fd2aa.
Write data to disk in pages
Updated for new Cohttp API
Batch up writes to disk