I agree about the CAPS, turn em Off...
Firstly ...a 3 month old baby in a 40 gallon is not good... especially if you are having aggression issues ...get a 10 gallon (20 at the max).
Crumple up some news paper (open it up a little) and scatter it through the enclosure... this will "cramp up" the wide open space and give it a bit more security...
Do not handle it for a week or two (except for feeding - if you feed out side the enclosure). If feeding in the enclosure... make sure the prey doesn't get covered in substrate...
(you don't wanna have to pull it out of the mouth of an aggressive snake).
Eventually remove one peice of news paper at a time
(like 1 pc a week)
You Need to have:
Hides - You will Need 2 hides (identical or similar) small enough for it to be snug around your Snake. This will provide the security your snake needs.One on Each side. One to be placed where the UTH under your enclosure is, and one on the Cool Side.
a Water dish big enogh for it to soak in (if need be)
- a healthy BP does not constantly soak
- if soaking there is a good chance there are mites, or the possibility of insecureness
Substrate - Almost anything can be used... News Paper, Shelf Liner (not contact paper), cypress... etc.
Carpet and Rug will hold moisture... but tends to Mold easily which could lead to health issues.
Do NOT use Cedar, Pine or Sand!
- Cedar and Pine oils are Toxic and Deadly to snakes, and Sand will dry them out, get between their scales and can get into their mouths and cause infection!
- NO Contact Paper -
Contact Paper - Like wall paper (smaller width/length) only with sticky back - like tape.
If your snake got caught up in that, it would be like some one falling into a pool with a tarp over it.
It would be a Big Mess!!!
Aspen is a common choice for most snake owners.
UTH (Under Tank Heater) outside, under the bottom of the Warm side
Digital Thermomiter/Hydrometer to measure the temps
- inside the hide on the Warm side, and at the bottom of the Cool side (also measures the Humidity)
Temps should read:
Warm Side: between 90f-93f
Cool Side:between 80f - 83f
Humidity: between 50% - 60% (raise to 70% when in shed)
In temp = Cool side temp
Out temp = Warm side temp
Bottom reading is the Humidity reading
You Need a Thermostat to control the UTH
(and any other heat source)
- Belly burn is Nasty, Unhealthy, and Very Costly!
A Thermostat works like one you would have on Your home furnace or A/C . It turns the heat source Off when reaching the Set Temps, and turns it back On when the temps fall below that. The heat source is plugged into the Thermostat, a probe similar to that of the Thermometer/Hydrometer's, under the Warm Side Hide. The Thermostat is not put in the enclosure.
A Digital Thermometer/Hydrometer like this one can be purchased at a store like Wal-Mart (in the Hardware Dept.), Lowes, or other hardware stores, for less than $15. If you don't want to do a lot of running around looking for a digital Thermometer/Hydrometer, make some calls, or look online.
The Probe (the wire thingie that reads the temps/humidity level)goes Inside the warm hide
(don’t attach it - makes for a pain when cleaning)
Unit goes on cool side... near the bottom of enclosure (the sensor is on the bottom of the unit)
If you have all of this and you are still having problems.... chances are there is some thing else going on! Mites (which in an infestation can kill your BP), RI (Resp. Infection), or some thing else.
Correct your husbandry and go from there 
If you appear nervous or frightened the reptile will sense it and become frigntened as well.