As regards the banging of the beak, it could mean any number of things depending on your particular bird and his mood at the time. My eclectus doesn't really tend to bang things with his beak... so far, but the cockatiel I had did. And for many different reasons.
Happiness: He would play pretty rough with his toys all the time, and he enjoyed it.
Signalling: If he had finished his food and was ready for more, he would bang his cup to let me know that I was slacking. (In his exalted opinion. Lol!)
Warning: If someone he didn't like was approaching his cage, he would bang his beak against the bars to let them know that he meant business!
So the reason for the beak banging can vary. You'll get a better idea as you continue to observe the circumstances whenever he does.
The biting, however, sounds territorial. I say this because you mentioned that he does it when he's been in his cage for a while. Was I reading what you were saying correctly? Does he bite mostly when he's in or near his cage? And how severely? Does he bruise or draw blood? Or is it more of a nip?