Work around an error that was spotted in the logs.
Split master logic to separate module
Adapt logging module
Split worker logic to separate module and add tests for actual proxy
and redirect.