Add a few optimizations