Definitely cook/ store food, lotions, hygiene stuff away from where you sleep. I think the recommended distance is 100 yards or maybe more. I've never used a fence, but would consider it if in a high-density area of bears. I'm normally a spray guy rather than gun, but when camping in Griz country, I have both. When I'm hunting, I only carry spray, but I sleep with a .454 pistol and spray handy. If a bear comes into your tent at night, that's a predatory behavior, and you need to fight back with everything you've got.