fix bugs and remove files