Simplifying proxy, adding interfaces and tests.