I have girls not boys, and mine are younger too, but I see in my eldest particularly that she goes through phases not dissimilar to above. They learn, but it's not an overnight thing. Give a message and then stick to it and reinforce it before it really goes in.
Most of the advice I read above is good but I'd make one other point. A lot of it is negative reinforcement (if you do that I'll stop you going / take your toys away…) You say above how proud you were of him tonight and it's really nice that you've come on here to tell us, but have you told the one person that really matters?
Tell him how proud you were not just with his skills and tricks but with the way he played the game. Tell him if he keeps that up he can have a Reading shirt with his name on the back (is he a striker? if so we'll buy him!!) – because you love it when he behaves really well. All kids, especially at that sort of age crave attention and we all IMHO fail to give enough positive attention.
Back to my girls, we're so used to enforcing discipline / breaking up petty arguments that when they do disappear upstairs and play nicely together we leave them to it just because we're glad of the break, instead of telling them how nice it is to see them play together and maybe occasionally join in too.