Improve creation of clauses and relations