Database now uses double buffering.

Added more types and tweaked the response context to support more types.