Getting a patent, itself, does not have anything to do with your potential infringement of some other patent. Having a patent gives you the right to try to stop others from violating your patent; it does not magically dissolve anyone else’s patent rights.
There is a good chance that what you are thinking of as an "improved version" will infringe on the patent for the old version unless you make a concerted effort, with advice from counsel, to design-around its claims. Some technology agreements stipulate that you will not undertake such an effort. Alternately, you could try to invent a completely different solution to the problem. To not infringe, it needs to avoid including all the claimed structures or all the claim steps in any of the claim of the licensed patent. Also, to be in the clear, it needs avoid infringing anybody else's patent. If you invent another way to solve the problem and stop using the licensed way to solve the problem, you can probably stop paying royalties. I say probably because you agreement with the licensor may have a requirement to exploit their technology and payments or penalties for not commercializing their technology. It could also be that you license includes a license to "know-how" or trade secrets on top of a patent license. A know-how and/or trade secret license might apply to whatever you end up doing as an alternate to the licensed patent.
Completely separate is the topic of you getting a patent on your new invention in order to stop people copying you.
The answer to the last part of the question might be found in your contract with the University.