Clean code and change wording

fix minor error and delete unused code