raoxunrong, delete unused methods and move some functionalities to utils