Factor out response data massaging

This factors out environment specific data massaging into its own function. This should probably be factored all the way out into its own class/function.. later.