Simplify and cleanup proxy creation

In the process of cleaning up the suggested changes in #22, I took the liberty of simplifying the proxy construction somewhat, see 9d31328780eb3a1f25b866fb78244353a7e03946 for details.

While doing so, I made some other minor improvements. I could make separate pull requests for them if you prefer, but I've tried to make the individual commits small enough whit reasonable commit messages.

This no longer memoizes the instance, but that's perhaps a good thing? Looking at it now it seems reasonable that if you set a new config you want a new instance, because the instance has a reference to the old config.