Add speed optimizations.