This chapter shall be liberally construed to effectuate its purpose. If a court declares any provision or application of this chapter to be illegal, the remaining provisions shall remain in effect. Courts are hereby authorized to reform the provisions of this chapter in order to preserve its maximum lawful effect.