OK, I got this client a couple of months ago, who requested an inventory program of sorts for a hobby of his. His budget was small, and I was leaving for Spain on study abroad fairly soon, so I did a quickie job. The program works just fine, exactly as he requested, but ever since then, he's been requesting little features added on here and there, and it's becoming a mess to maintain. I feel like if I took the code and did some refactoring, it could internally work a lot smoother and wouldn't be so difficult to add features...
Should I have done something different? Should I have designed the site to be flexible and work even after I've added a good 20 other features? I wasn't paid for that, I was paid to make a program that works. Should I just refactor the code on my own time, so its easier to maintain? I don't feel like that's something I could charge him for.
Any thoughts?