Made several other performance enhancements (hopefully)