removing target directory and other stuff