Refactors cad layer