Make some optimizations.