Almost done. Still not replacing clauses.