Refactorings; introduce a few static base classes.
Added simple proxy server and related tests.