Minor enhancements for clarity and special cases.