A few micro-optimisations