Moved clause_form functions to separate file