Fixed some perfomrance "issues" and reverted some bad changes