Instead of just punishing the bad behavior reward the good, and focus on that.
If he's niping...hitting him back may just result in him thinking its a game...not always but some horses take it that way.
Im a fan of clicker training. Not sure if you are fimiliar with that? But I love it. All you need is a little clicker,ordered off line or sold in some stores.
When ever he does it correct, heaps of praise....click and reward...
When he trys to nip, firm no! With the voise, but that best works if you can do it before he gets his head round to do it. So watch him carefully. It shouldnt take long for him to catch on to what is the desireble behavior.