Applying some performance enhancements