fix infinite loop
remove useless files