tweak some requires
use Rack::Request and Rack::Response abstractions (instead of examining env directly)