remove useless code and consideration, neaten the code style