Improvements to the implementation.