Setting up the right legal and financial foundations