Considerably simplifies the buffered file implementation.