Add some optimizations