Several performance enhancements