Templates:remove templates after compiling from DOM