First, even though you worked for free, recognize that your work very possibly had great value to this company. Even if you feel you were a beginner or that your code was not well written, very possibly your work was much more valuable than you thought at the time.
Second, based on your description, remember that this is very likely not your fault. So, you shouldn't feel like you're imposing or being unreasonable by insisting on fixing things in a correct fashion that is amicable to everyone.
Third, keep in mind that the academic's company is likely much more eager than you to resolve this issue. As just one example, it sounds like you may still own the copyright to your code. If so, they may want to purchase the copyright from you.
Finally, do not be concerned about talking with an employment lawyer. A lawyer will very likely give you a free consultation. I am sure the business is looking at this from a legal perspective, so it would help you to see it from that perspective too. The lawyer may even accept your case on contingency, where they are only paid if you are. So, I strongly suggest talking with a lawyer soon before talking with the company further.