scripting changes for correctly wrapping database data and handling request and response.