update stats handling and small white space fixes