Fix shebang and coding lines
Factor out helper functions
FIX: ad detect when forwarding metadata. Fixes #6
Print client request headers to stderr.