Letting all the people with all the knowledge go is indeed not so smart. You better have a development team with both employees and freelancers. So knowledge about the software keeps inside the company. Working with employees only has the danger of getting tunnel vision: "This is what we always did and it works for us". Working with (experienced) freelancers has the benefit of bringing in new knowledge and new insights.
Of course you also need to have some code standards, but there's no difference between employees and freelancers in this respect.