Small improvements for implementation.