I've been working on a freelance project for about a year. I build a new feature every month as per client request. Things went smoothly the first several months. I built each new feature as a separate module. But today, there are too many different modules for me to manage and new developers on the project are confused by the complexity of the system. If I had enough time and money, I would re-write many of old modules and consolidate them under one super module to improve system maintenance.
When I compare working for a large company to working as a freelancer, it's easier to convince an experienced-supervisor of a big company than a freelance client on the costs and merits of refactoring a system. Supervisors understand software entropy while freelance clients generally don't. Freelance clients are prone to asking, "But I already paid you X dollars to build the payment system. Why do I need to pay you Y dollars to rewrite it? Is it because you didn't do a good job? Maybe I should hire someone else."
So I suppose my problems are as follow:
1) I find it difficult to convince my clients of the value of my work, so I'm often underpaid. Additionally, it makes it extremely difficult to convince clients to pay me to refactor old code.
2) I receive requests for new modules every month and build accordingly. Had a I known the "exact" details of future modules for the next several months, perhaps I'd be able to build a more generic framework for the long haul, instead of just tacking on one module after another.
3) Maybe these difficulties are the nature of freelance development and I should just accept it?
4) A client does not see no tangible results of refactoring. It's difficult to sell them on something they can't see.
I know I'm about to ask a very broad question, but with regards to all the issues I've stated above, what can I do to make freelance life easier?