Split things up so that proxy code can static link