Various small improvements, including performance instrumentation.