Small optimizations.
benchmark added.