Bug fixes. Updates to latest improve-buffers branch.