copy some files and minor fixes