Re-factoring legal design and test