Ditto on all of this..
As for stroking him, they don't necessarily like being petted.. Plus waving your hand in front of him may definitely trigger a strike. Either a fear response, or striking at your heat signature out of hunger.
Remember they are wild animals that operate on instinct. Reach in and quickly scoop him out. Do not reach in going in towards his head/face. Reach in coming from behind wherever his head is and grab a large portion of his body which is well behind his head.
If you are still nervous, cover his head with something like a towel and then scoop him out. Many snakes have a sort of "cage aggression". Especially when they are new and not use to being handled. These snake usually never try to bite once they are actually in your hands.
Then just handle gently. Don't stroke or pet, and don't mess with its head, face, or tail. After its use to you handling it, you can begin slowly covering its head with your cupped hand and gently touching it's head in the process. This will help cure the headshy-ness.