Structure re-org for testing.

Added initial maxdistancewrapper.