Added compile.precopy function