he is trying to see how far he can get away with things. I went through the same thing with my pup, now 6 months old and gentle. I too pulled my hair out sometimes. I played a lot of tug (by the rules; mine!) to get it out of his system and a lot of on leash time inside to control his biting me and the other, older dogs (you just keep him out of reach and teach him "Leave It!"
Also take him to a class and let him play with safe, socially skilled adult dogs that will teach him "NO!". He will scream bloody murder but that's what his mom has done too.
This formula turned my pup into the dog I had in mind when I got him.