Some microoptimisations from profiling
Merge