wip Cleanup proxy package and improve test coverage.

Do not merge!