fix a bug and remove some files that are of no use