Fixes to pass rw-env to next page view, so it can be reused. Fixed properly close onion at sigterm/sigint.