Fixed some issues and added file copying.