Add documentation and clean up proxy a bit.