[4.1] Improvements

Micro-optimisations, and very minor docblock fixes.